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
11 Replies
That tells you straight away. CORS Error, so you are loading from a different url to what your application is serving
would you please provide any solutions
Load the image over the same domain.
Where do you get that error in filament or outside filament?
I am confused but i think it's outside filament and here is what i did nothing else and i run php artisan storage:link
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
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
There is your problem.
Chang eyou APP_URL to http://127.0.0.1:8000
oh now it''s working π
thank you very much
one more hand please i want to show the actual image to the user instead of this gray placeholder
->preview()