Flutter web Image.network() not loading but url is correct.

Phong Yew Tong
2 min readJan 9, 2023

--

Artur Shamsutdinov

Subscribe to TLDRStories.com to get your daily dose of tech news, condensed into a few stories.

I build my app for android and iOS. So recently flutter run it on the web and all hell broke lose. The first run didn't even work.

Image.network() errorbuilder was throwing this error below:

Error message

ImageCodecException: Failed to load network image.
Image URL: https://images.igdb.com/igdb/image/upload/t_cover_big/ss6bi7081my4mzebjkzb.png
Trying to load an image from another domain? Find answers at:
https://flutter.dev/docs/development/platform-integration/web-images

All the images on my web version didn't really work but it works on iOS and android.

Put this in your index.html and the images will start appearing!

<script type="text/javascript">
window.flutterWebRenderer = "html";
</script>

Weeeeeeeeee…. it's fixed!

😁 Follow me and drop me some claps πŸ‘πŸ‘ πŸ‘ if this article helps you, it motivates πŸ’ͺ me to create more! Thank you, everyone! πŸ™

Subscribe to TLDRStories.com to get your daily dose of tech news, condensed into a few stories.

--

--

Phong Yew Tong

Entrepreneurship, React, Flutter, Firebase, Typescript, Javascript, ChatGPT https://bento.me/tldrstories