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

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay