iOS10 WkWebView Data URL decoding failed

2.3k views Asked by At

Did anyone experience problems in iOS10 displaying PNG's as data-url?

This code works flawless in WkWebView iOS9, but it fails with 'Failed to load resource: Data URL decoding failed' in WkWebView iOS10:

<img src="data:image/png;base64,iVBORw0KGgoAA ...[skipped]... ">

Displaying JPEG's works fine in both iOS9 and iOS10.

2

There are 2 answers

0
Edwin Lijnzaad On BEST ANSWER

For anyone experiencing this problem, it disappeared after upgrading to Cordova iOS 4.3.0.

0
Paul Kok On

I think you have found a bug for iOS10 Apple has to fix. I also ran into these kind of problems embedding PNG images as data-url in a PDF. I use pdfmake javascript library (pdfmake.org) to generate PDF's client side and when I embed a PNG image it gives me errors. JPG images work just fine.

Unfortunately I only see one workaround now and that is to use JPG images in stead of PNGs.