Laravel: Uploaded image not showing

83 Views Asked by At

i keep getting 404 image not found when viewing the uploaded image on my project but the image is there. im using laravel's asset() helper to retrieve the image. the url in chrome shows http://127.0.0.1:8000/images/dU8oaVTAwQyTor86jvDtdGKvE7H3MYkHZuUG60gH.png and ive already done php artisan storage:link. any help is greatly appreciated.

2

There are 2 best solutions below

0
Thibaut On BEST ANSWER

You shouldn't use the asset helper for this, the url generated is wrong. As you use the public storage, the url is supposed to be like this :

http://127.0.0.1:8000/storage/images/dU8oaVTAwQyTor86jvDtdGKvE7H3MYkHZuUG60gH.png
0
kristi tanellari On

but aren't you supposed to access the image through the public folder if you do php artisan storage:link