Denis2310
Denis2310

Reputation: 1218

Laravel 5.6 file not found in storage

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!

Upvotes: 1

Views: 3110

Answers (2)

Semazen
Semazen

Reputation: 1

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".

Upvotes: 0

Denis2310
Denis2310

Reputation: 1218

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.

Upvotes: 3

Related Questions