Images only visible on my machine in Laravel + Filament project
What I am trying to do:
Display images stored in Laravel using Filament, and ensure they are visible to others who clone the project.
What I did:
I successfully configured everything on my machine. I ran php artisan storage:link and updated the .env file with APP_URL=http://127.0.0.1:8000. The images load correctly for me. I shared the project with a friend via GitHub.
My issue/the error:
The images are not showing on my friend's machine, even though everything works fine for me. They cloned the repo from GitHub and also ran php artisan storage:link. Still, the images don't appear. We are both running the project locally. What could be causing this issue?
29 Replies
The storage directory is excluded in your .gitignore

line 6 and 7?
Does the storage directory and sub directories exist when you look at the repo on github?
Typically all of storage is excluded from git.

Not talking about the symlink in public.
Talking about the actual storage directory at the root. Also weird that GitHub is tracking a symlink.
i need help bro :/

Right but that’s a symlink which exists on the machine. Again not what I’m asking. On GitHub, does the storage directory have all the files.
/storage not /public/storage
Symlinks shouldn’t even be in github. Something is off in your codebase.
I don't have any files on my github according to public/storage
can u help me bro?
I think you’re not understanding what I’m saying.
im using translate
i speak spanish
jeje
Ignore public/storage for now. What does /storage show in your github repo.?

And inside app? In that directory.
Ok. Thats the problem, files you are putting into storage/app are not getting committed to the repo which is why when your coworker pulls it down they don’t have them.
Even with storage:link
ok
i understand now
Storage:link creates a symlink in public to /storage.
so how i can fix?
You have to modify your gitignore to include them
i have to include public/storage and put php artisan storage:link again?
No, you have to change your gitignore to not ignore anything inside /storage that you want to commit. When someone pulls down the repo they will still need to run storage:link in their environment.
can i call you so we can understand each other better?
Not somewhere I can take a call right now. Read up on the laravel docs for storage. I’m sure there’s plenty of articles about it too as it relates to git.
The issue is really more of an understanding of git and not a filament or laravel thing.
ooo
ty bro, i will check docs and try to fix the problem
if i get a problem can i ask you again?
Sure.