and remove /storage/app/public from .gitignore
don't do this unless you want all your testing images stored in your code repository
in blade you need
img src="{{asset('storage/' . $profile_pic }}"
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I am using Livewire to upload files and working fine. The next line do the job:
$url_photo = $this->photo->store('photos','public');
The file was saved on "storage/app/public/photos", i get that info from $url_photo. But when i try to get the file back, i get a 404 response.
$this->profile_pic = $url_photo; // the url = photos/h0njfN6ve7G2dWASdWUWgbzHgoB52CK8szM49qWl.png
in blade : img src=" / {{ $profile_pic }} "
i already did "php artisan storage:link" and remove /storage/app/public from .gitignore
Locally just add "storage " to the url and works, like this
$this->profile_pic = "storage/photos/h0njfN6ve7G2dWASdWUWgbzHgoB52CK8szM49qWl.png"
But in Production fails miserably. I am using forge to deploy to digitalOcean,
any idea? what i'm doing wrong
Go to your public folder on the base directory and delete the existing storage shortcut file created previously. Then run the php artisan storage:link again. This will do the trick!
Please or to participate in this conversation.