Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

CORS not image-enabled. What to do?

In the two examples below, the first returns the image correctly, in the second it gives an error:

"Failed to load network image".

Is this a CORS issue? That is, on the server in the second example, cross-origin is not enabled? What to do?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Image.network('https://cdn.pixabay.com/photo/2017/12/06/11/03/brazil-3001462_960_720.png')
Image.network('https://www.camara.leg.br/internet/deputado/bandep/204379.jpg')

Thank you very much

>Solution :

It’s a duplicate question of Flutter web can’t load network image from another domain

Use html renderer to overcome the issue, cis here for chrome.

flutter run -d c --web-renderer html
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading