DEV Community

Chidiebere Chukwudi
Chidiebere Chukwudi

Posted on • Updated on • Originally published at jovialcore.tech

[Solved] laravel storage:link not working

Solution

Pheeew... after hours of searching the internet to solve this problem, I found an answer to this via stackoverflow but wait...

Guess you are trying to get an image from your storage folder in your laravel app but take note of the following:

Make sure you run php artisan storage:link: it creates a symbolic link in the public folder.

If you are coming from laravel 8.x and have indeed ran the command php artisan storage:link (to create a symbolic link ), but your code is not working i.e the file you are trying to load is not displaying, then you are like me.

Solution:

Just like awais ahmad from stack overflow mentioned, this solution proved helpful for my laravel project.

I have not added the "storage" path name from my blade file with the asset helper function so my image path was not outputing anything but when I typed the 'storage' path name like so: asset('storage/uploads/pic1.png) my code worked!

Guess this might help someone.

Just a Promotion : Experience reliable hosting with interserver

You can reach me out on Twitter. I'm on
Linked too

Latest comments (0)