Imager-Craft
Imager-Craft copied to clipboard
base64Pixel() conflict with Picturefill.js (IE11)
The code generated by this causes picturefill.js to crash IE 11 (assuming you are using it to polyfill <picture> in older browsers that don't natively support it):
<img src="{{ craft.imager.base64Pixel(16, 9) }}">
Not really a bug but I thought I'd leave this note here in case anyone else runs into it and save them the hour I spent tracking it down.
Thanks Mark. Have you tracked down the underlying cause? Is it the fact that it's a base64 encoded svg, or something with the escaping maybe?
As far as I can tell base64 is fine so long as it's a gif, but that code generates an SVG and that's what is causing picturefill to choke. This works fine:
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">