Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.79k stars 860 forks source link

[BUG] flutter_html_svg #1301

Open LokieVikky opened 1 year ago

LokieVikky commented 1 year ago

SVG Images are not loading when the image path does not have a .svg extension

Problematic URL https://img.shields.io/badge/-PostgreSQL-informational?style=flat&logo=postgresql&logoColor=white&color=4169E1

The same URL works if mentioned with .svg extension https://img.shields.io/badge/-PostgreSQL-informational.svg?style=flat&logo=postgresql&logoColor=white&color=4169E1

Even with .svg extension added to the URL, it not loading the Actual SVG Picture

Expected Image expected

Actual Image actual

NamanShergill commented 11 months ago

I think this issue should be opened in flutter_svg, as this issue also exists in https://pub.dev/packages/flutter_widget_from_html

So very likely an issue with flutter_svg itself.

daohoangson commented 11 months ago

It is a problem with the SVG lib, actually two:

(1) font-size="110" doesn't work with transform="scale(.1)" properly. I tried "font-size-11" and it worked better:

Screenshot 2023-10-16 at 09 09 58

(2) IMAGE tag with SVG data URI doesn't seem to work. As seen in the above screenshot, it didn't render the elephant.