[Vuejs]-Cannot display image in vue.js

0👍

Have you create a storage link? php artisan storage:link https://laravel.com/docs/8.x/filesystem#the-public-disk

Then you should be able to use the uri like /storgae/img/user_image/285070719.png

0👍

Make sure that you created the symlink from public/storage to storage/app/public with php artisan storage:link, after that make sure that the generated URL is correct.

The following URL should be generated:

http://localhost:8000/storage/img/user_image/285070719.png

Something like the following should work for you:

<img :src="'/storage'+profile.image">

From the docs:

The public disk is intended for files that are going to be publicly accessible. By default, the public disk uses the local driver and stores these files in storage/app/public. To make them accessible from the web, you should create a symbolic link from public/storage to storage/app/public. To create the symbolic link, you may use the storage:link Artisan command: php artisan storage:link

Leave a comment