Skip to content

[web] Add Support for ICO files / urls / content to display with Image widget #105848

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

Open
yegor-pelykh opened this issue Jun 12, 2022 · 6 comments
Labels
a: images Loading, displaying, rendering images c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter engine flutter/engine repository. See also e: labels. P3 Issues that are less important to the Flutter project platform-web Web applications specifically team-engine Owned by Engine team triaged-engine Triaged by Engine team

Comments

@yegor-pelykh
Copy link

Why the Image widget doesn't support ICO files, urls, content? This format is very common.
Can you add support for it?

@maheshj01 maheshj01 added the in triage Presently being triaged by the triage team label Jun 13, 2022
@maheshj01
Copy link
Member

Hi @yegor-pelykh, Thanks for filing the issue, Labeling this issue as a new feature request.

 Image.asset('assets/flutter.ico'),

image

Related to #17356

flutter doctor -v (mac)
[✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-arm, locale en-IN)
    • Flutter version 3.0.2 at /Users/mahesh/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision cd41fdd495 (5 days ago), 2022-06-08 09:52:13 -0700
    • Engine revision f15f824b57
    • Dart version 2.17.3
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-32, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.67.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.42.0

[✓] Connected device (3 available)
    • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64  • Android 11 (API 30) (emulator)
    • macOS (desktop)           • macos         • darwin-arm64   • macOS 12.4 21F79 darwin-arm
    • Chrome (web)              • chrome        • web-javascript • Google Chrome 102.0.5005.61

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
[✓] Flutter (Channel master, 3.1.0-0.0.pre.1237, on macOS 12.4 21F79 darwin-arm, locale en-IN)
    • Flutter version 3.1.0-0.0.pre.1237 at /Users/mahesh/Documents/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6062e40510 (64 minutes ago), 2022-06-12 23:53:08 -0400
    • Engine revision f80294b57e
    • Dart version 2.18.0 (build 2.18.0-180.0.dev)
    • DevTools version 2.14.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-32, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.67.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.42.0

[✓] Connected device (3 available)
    • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64  • Android 11 (API 30) (emulator)
    • macOS (desktop)           • macos         • darwin-arm64   • macOS 12.4 21F79 darwin-arm
    • Chrome (web)              • chrome        • web-javascript • Google Chrome 102.0.5005.61

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

cc: @chinmaygarde

@maheshj01 maheshj01 added c: new feature Nothing broken; request for a new capability engine flutter/engine repository. See also e: labels. a: images Loading, displaying, rendering images c: proposal A detailed proposal for a change to Flutter and removed in triage Presently being triaged by the triage team labels Jun 13, 2022
@chinmaygarde chinmaygarde added the P3 Issues that are less important to the Flutter project label Jun 13, 2022
@yegor-pelykh
Copy link
Author

@maheshmnj
Could you bring it up again and maybe try to implement it please? I really need this functionality.
Thank you!

@maheshj01
Copy link
Member

@yegor-pelykh The issue is already prioritized, Unfortunately, we cannot do much about it, All we can do is wait until someone shows interest to contribute to this issue (since it's a feature request). The other way to increase its priority is to have more upvotes on the issue (which indicates this is affecting a significant group of users).

I would recommend you to please read when will my bug be fixed?

@milke
Copy link

milke commented Mar 9, 2025

I'd appreciate if this can be prioritized and fixed. I think it's rather important functionality as ico files can come from favicons of many current websites, and this is a real issue that hasn't been looked at in almost 3 years. Му flutter applications really need this.

This is the error when trying to draw an ico:

 "ImageCodecException: Failed to detect image file format using the file header.
File header was [0x00 0x00 0x01 0x00 0x03 0x00 0x30 0x30 0x00 0x00].
Image source: encoded image bytes"

Thanks.

@maheshj01 maheshj01 added the platform-web Web applications specifically label Mar 10, 2025
@maheshj01 maheshj01 changed the title Support of ICO files / urls / content to display with Image widget [web] Add Support for ICO files / urls / content to display with Image widget Mar 10, 2025
@definev
Copy link

definev commented Apr 13, 2025

I has similar issue, please fix it, my app is an extension that really need display the favIcon to user

@FaFre
Copy link

FaFre commented May 22, 2025

I have good news! I could successfully decode ICO's using the image package on web: https://pub.dev/packages/image it seems well maintained and used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: images Loading, displaying, rendering images c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter engine flutter/engine repository. See also e: labels. P3 Issues that are less important to the Flutter project platform-web Web applications specifically team-engine Owned by Engine team triaged-engine Triaged by Engine team
Projects
None yet
Development

No branches or pull requests

6 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy