简体   繁体   中英

Display image in browser from storage laravel

How can i display image form storage

My images are in storage/uploads folder

Iam doing this < img src="{{Storage::url($user->image)}}" >

I have also done php artisan storage:link

My url is

http://localhost:8000/storage/uploads/fU46qscYTreoFzeKLMBfCVb0uceuvGlAMhNPwozH.png

I am getting NotFoundHttpException in RouteCollection.php line 161:

How can i get image < img src="{{Storage::url($user->image)}}" > ??

Since you are using a symbolic link, you now should have a symlink from public/storage to storage/app/public. Please check if it is working or not. If yes, then you can access those files by using:

<img src="{{asset(map_storage_path_to_link($user->image) )}}">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM