Skip to content

Flutter Web SVG is rendering in Chrome fine, but not Firefox #66412

@jpeiffer

Description

@jpeiffer

Steps to Reproduce

  1. Create a Flutter template app
  2. Swap the contents of the Center widget with:
Image.network(
"data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+QWJzdHJhY3QgaWNvbjwvdGl0bGU+PHBhdGggZD0iTTEyIDBjOS42MDEgMCAxMiAyLjM5OSAxMiAxMiAwIDkuNjAxLTIuMzk5IDEyLTEyIDEyLTkuNjAxIDAtMTItMi4zOTktMTItMTJDMCAyLjM5OSAyLjM5OSAwIDEyIDB6bS0xLjk2OSAxOC41NjRjMi41MjQuMDAzIDQuNjA0LTIuMDcgNC42MDktNC41OTUgMC0yLjUyMS0yLjA3NC00LjU5NS00LjU5NS00LjU5NVM1LjQ1IDExLjQ0OSA1LjQ1IDEzLjk2OWMwIDIuNTE2IDIuMDY1IDQuNTg4IDQuNTgxIDQuNTk1em04LjM0NC0uMTg5VjUuNjI1SDUuNjI1djIuMjQ3aDEwLjQ5OHYxMC41MDNoMi4yNTJ6bS04LjM0NC02Ljc0OGEyLjM0MyAyLjM0MyAwIDExLS4wMDIgNC42ODYgMi4zNDMgMi4zNDMgMCAwMS4wMDItNC42ODZ6Ii8+PC9zdmc+",
height: 70,
width: 70,
)

Full repo of the problem can be found here:
https://github.com/jpeiffer/flutter_firefox_svg_issue

Note: although other platforms exist in that repo, this bug only is about the WEB platform.

Expected results:

SVG renders in all browsers

Actual results:

SVG renders fine in Chrome, but not Firefox

Issue

Flutter Doctor
[✓] Flutter (Channel dev, 1.23.0-4.0.pre, on Mac OS X 10.15.6 19G2021 x86_64, locale en-US)
    • Flutter version 1.23.0-4.0.pre at /Users/jpeiffer/flutter
    • Framework revision 83dd176777 (8 hours ago), 2020-09-22 12:04:44 -0700
    • Engine revision 2abe69c608
    • Dart version 2.10.0 (build 2.10.0-136.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/jpeiffer/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/jpeiffer/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0, Build version 12A7209
    • CocoaPods version 1.9.3

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

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 47.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

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

 
[✓] Connected device (5 available)            
    • sdk gphone x86 arm (mobile) • emulator-5554                        • android-x86    • Android 11 (API 30) (emulator)
    • iPhone 11 Pro Max (mobile)  • 8457B0C6-D39C-41CC-8ADE-0EB6AA5DC60B • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
    • macOS (desktop)             • macos                                • darwin-x64     • Mac OS X 10.15.6 19G2021 x86_64
    • Web Server (web)            • web-server                           • web-javascript • Flutter Tools
    • Chrome (web)                • chrome                               • web-javascript • Google Chrome 85.0.4183.121

</details>

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: imagesLoading, displaying, rendering imagesfound in release: 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specifically

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions