Reputation: 2329
In Ubuntu 16.04, I have a project in Laravel 5.5 and I stored some images through script. The image files are stored into the path:
root-of-laravelProject/stroage/app/public/
however, if I want to display them directly in the browser like : http://127.0.0.1:8000/storage/image_1523525873.png , the images are not showing (Sorry, the page you are looking for could not be found). I also used this command : php artisan storage:link
however, it shows:
The "public/storage" directory already exists.
Upvotes: 0
Views: 686
Reputation: 3159
If you can't automatically create a symbolic link using php artisan storage:link
, create one manually from the terminal.
Go to your <project>/public/
directory. Open terminal in that directory. And run the following command:
ln -s ../storage/app/public/
This will generate a symbolic link pointing to:
<project>/storage/app/public/
And if you still have issue with permission. Try with sudo
:
sudo ln -s ../storage/app/public/
Upvotes: 1
Reputation: 1944
run the following
rm -R public/storage
then
php artisan storage:link
Upvotes: 1