Flutter_html: Base64 encoded images

Created on 29 Jan 2019  路  3Comments  路  Source: Sub6Resources/flutter_html

Base64 encoded images currently throw an exception. Can they be supported?

enhancement medium-priority

Most helpful comment

Support for base64 images has been added in version 0.9.3. Thanks @andokai for the issue report.

All 3 comments

I was able to work around this by implementing a custom render function

                customRender: (node, children) {
                  if (node is dom.Element) {
                    switch (node.localName) {
                      case "img":
                        Uint8List bytes =
                            base64.decode(node.attributes['src'].split(",")[1]);
                        return Image.memory(bytes);
                    }
                  }
                },

I'm going to reopen this because I think base64 images fall under the scope of this project. I'll work on adding them. Thanks for the report!

Support for base64 images has been added in version 0.9.3. Thanks @andokai for the issue report.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nijinsha picture Nijinsha  路  4Comments

DrobyshevAlex picture DrobyshevAlex  路  3Comments

munnadroid picture munnadroid  路  6Comments

NicoDreamzZ picture NicoDreamzZ  路  5Comments

robert-virkus picture robert-virkus  路  3Comments