I'm working on a React-app in which I would like to show the avatar of the logged in user. I retrieve all the user-information from my PHP backend, so i know the url of the image i want to show. The images however, are stored in a private folder which is protected with a .htaccess file.
Because of privacy reasons, the images-folder needs to remain private, so the images can't directly be accessed. I was thinking about converting the image with base64 encoding and passing it through the api, but this doesn't feel like a correct solution. Is there a way to retrieve the images from the private folder, by authenticating myself in any kind of way?
Thanks in advance