Search code examples
laravelfile-uploadlaravel-filesystem

Laravel: Uploaded image not showing


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.


Solution

  • 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