Laravel images broken when deployed

Published 3 months ago by graffislife

Hi guys, I deployed my work online and I have an error. My images are not showing up. What could be the problem here? My directory is at the storage. I am also using This

/storage/design_image/{{$inventory->design_image}}
jdc1898

If you put images outside of the public folder then they will not be accessible to visitors.

If you do decide to do this, then any images will need to be streamed to the client by your code and not directly accessible as assets by the browser

graffislife

But I used vendor storage

graffislife

I mean I am using storage link

jdc1898

Did you create a symbolic link by using the php artisan storage:link command?

graffislife

Yes I did. It said The "public/storage" directory already exist."

jdc1898

Okay. If you have a file that you put in that directory, say sample.jpg, then the image will be available. Example: http://localhost/storage/sample.jpg

Snapey
Snapey
3 months ago (1,036,605 XP)

If it said file already existed, why did you not investigate that?

Please sign in or create an account to participate in this conversation.