Whenever i upload an image in the ecommerce platform, the response when trying to load the image is 404 not found. I have verified that the image exists and the path is correct. I have also change the permission on the file to ensure that it is publicly accessible. What may be the issue here?
2 Answers
Best Answer
Hello,
In case you have multiple servers, you need to have the centralized location of images, by either mounting the media folder into a shared network drive like AWS EFS, or configure S3 for the default disk for serving media.
https://spatie.be/docs/laravel-medialibrary/v3/installation-setup
Hello,
If the image exits and path is correct, I don't see any other reason than page does not exist other than permissions,
because this thing is a webserver and related to the application at all to serve an image
Thanks for the response, the issue was that i had multiple servers running and the image would be uploaded to one server but not replicated on the others hence why i was getting the 404. I mounted the media folder across all servers and that solved the isuue.
Please login or Register to submit your answer