Home:ALL Converter>iOS10 WkWebView Data URL decoding failed

iOS10 WkWebView Data URL decoding failed

Ask Time:2016-09-19T22:06:06         Author:Edwin Lijnzaad

Json Formatter

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.

Author:Edwin Lijnzaad,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39575187/ios10-wkwebview-data-url-decoding-failed
Paul Kok :

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.\n\nUnfortunately I only see one workaround now and that is to use JPG images in stead of PNGs.",
2016-09-21T08:15:39
yy