Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading image from Wordpress on webapp Canvaskit failing #41

Closed
RoyalCoder88 opened this issue Oct 17, 2023 · 2 comments
Closed

Loading image from Wordpress on webapp Canvaskit failing #41

RoyalCoder88 opened this issue Oct 17, 2023 · 2 comments

Comments

@RoyalCoder88
Copy link

Hi @ArunPrakashG ,

Thanks again for your great support, I have a big problem loading images from a WordPress website in a Flutter web app with Canvaskit renderer, in a release mode I get this error:

Access to fetch at 'https://b2bboostify.co.uk/wp-content/uploads/2023/10/two-young-happy-businesswomen-celebrating-project-success-office.jpg' from origin 'https://b2boostify.web.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

error_image_load

I understand it's a very common problem, do you know a solution for this issue?

Thanks in advance!

@ArunPrakashG
Copy link
Owner

Hi @RoyalCoder88 !
From the screenshots I believe the website doesn't have the CORs policies correctly configured. As it is WordPress, you could checkout some plugins which configures it properly. My knowledge on the topic is limited.

On quick google, found this forum thread which has answers to what you might be looking for:
https://wordpress.org/support/topic/cors-cross-origin-resource-sharing/

@RoyalCoder88
Copy link
Author

Thanks a lot, @ArunPrakashG , I fixed this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants