simpel's avatar

Why isn't my images showing up?

Hi all,

I know this question has been posted before but I just don't get it!

I'm trying to access uploaded images that are stored under /public/storage/app_icons/upoCFOZpQVfoEOQ1xONUaU537rJweZ8Oqqn2f75t.png on the server. I'm confident that my upload form is working as it should.

In the browser I'm using /storage/app_icons/upoCFOZpQVfoEOQ1xONUaU537rJweZ8Oqqn2f75t.png to access the file but for some reason I get a "Page not Found". The URL is returned by Storage::url($image->path). The symlinks are aslo created via the artisan command. I'm struggeling with this on a local Homestead installation.

So, the question then; What do I have to do? Is there anything I need to change regarding folder permissions? What have I missed?

0 likes
5 replies
Cronix's avatar

Do you happen to have a route that starts with /storage, that might be intercepting the image request?

click's avatar

I'm confident that my upload form is working as it should.

Pretty obvious question but: Is the file you are trying to reach actually in that directory? You could think your upload form is working great but if your file is not stored at the location you expect you will never be able to retrieve it.

simpel's avatar

@click Nope, the file is there @Cronix No route or anything like that..

One strange thing though is that when I vagrant ssh into the Homestead VM The symlink looks like this:

storage -> /Users/simpel/dev/Github/regionhalland/app/server/storage/app/public

shouldn't it be

storage -> /home/vagrant/sites/regionhalland/app/server/storage/app/public?

Cronix's avatar
Cronix
Best Answer
Level 67

Yes, it should be the 2nd one. Did you run artisan storage:link from within /home/vagrant/sites/regionhalland?

1 like
simpel's avatar

Nope, i ran it from my local machine... Doh..! :)

Please or to participate in this conversation.