1

My Laravel application is about uploading and showing images. It was working good and all images where shown correctly. Now a few weeks later I tried to test it again and it stopped working. Images are in Laravel storage and path is correct but it says: "Failed to load resource: the server responded with a status of 404 (Not Found)".

Path is: http://localhost:8000/storage/images/8/uploaded/1536930406sunflower.png, and it's correct, image is there.

Weird is that it was working for months and now images cannot be found.

Thanks!

Denis2310
  • 939
  • 1
  • 15
  • 41

2 Answers2

3

I have found the solution to my question and for those who have the same problem:

Storage link in public folder can be possibly broken.

1)Delete storage link in app/public folder.

2)Run command php artisan storage:link to create storage link again.

Denis2310
  • 939
  • 1
  • 15
  • 41
0

Also, you have to be sure about your upload folder name and database image addresses are the same.

Otherwise, it will broke and do not forget that it is case sensitive.Example: If image address is "jpg/photo1.jpg" on DB. Your upload folder in storage folder must be "jpg" not "JPG".

Semazen
  • 1
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 18 '23 at 22:34