DEV Community

Chidiebere Chukwudi
Chidiebere Chukwudi

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

7

[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

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs