Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base64Pixel() conflict with Picturefill.js (IE11) #137

Open
croxton opened this issue Oct 26, 2017 · 2 comments
Open

base64Pixel() conflict with Picturefill.js (IE11) #137

croxton opened this issue Oct 26, 2017 · 2 comments

Comments

@croxton
Copy link

croxton commented Oct 26, 2017

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.

@aelvan
Copy link
Owner

aelvan commented Oct 26, 2017

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?

@croxton
Copy link
Author

croxton commented Oct 26, 2017

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==">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants