image not loading but accessible via URL

Hi am uploading an image and i also run php artisan storage:link and still image is not loading this is the error am getting
No description
Solution:
There is your problem.
Jump to solution
11 Replies
toeknee
toeknee11mo ago
That tells you straight away. CORS Error, so you are loading from a different url to what your application is serving
Adnan Yalahow
Adnan YalahowOP11mo ago
would you please provide any solutions
toeknee
toeknee11mo ago
Load the image over the same domain. Where do you get that error in filament or outside filament?
Adnan Yalahow
Adnan YalahowOP11mo ago
I am confused but i think it's outside filament and here is what i did
Forms\Components\FileUpload::make('logo')
Forms\Components\FileUpload::make('logo')
nothing else and i run php artisan storage:link
toeknee
toeknee11mo ago
Well, you are either in filament or outside of filament. If the error occurs when uploading an image in a filament form... what is the domain with the error in that screenshot, what is your laravel app_url in the .env
Adnan Yalahow
Adnan YalahowOP11mo ago
this is my app_url in the .env APP_URL=http://localhost:8000 and this is my actual url http://127.0.0.1:8000/settings/organization-details/1/edit
Solution
toeknee
toeknee11mo ago
There is your problem.
toeknee
toeknee11mo ago
Chang eyou APP_URL to http://127.0.0.1:8000
Adnan Yalahow
Adnan YalahowOP11mo ago
oh now it''s working 😆 thank you very much
Adnan Yalahow
Adnan YalahowOP11mo ago
one more hand please i want to show the actual image to the user instead of this gray placeholder
No description
toeknee
toeknee11mo ago
->preview()

Did you find this page helpful?