Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

render image using datauri in javascript

I am trying to load an image using AJAX that is sent as data uri. Everything works fine as long as image is < 32kb. Some of the images are large in size around 500 kb. I did some research on this and found that IE8 supports only images < 32kb to be loaded using datauri.

Is there any workaround to load the image which is > 32kb or am i missing something here?

like image 297
Asdfg Avatar asked Sep 29 '26 04:09

Asdfg


1 Answers

Data URI scheme

Internet Explorer 8: Microsoft has limited its support to certain "non-navigable" content for security reasons, including concerns that JavaScript embedded in a data URI may not be interpretable by script filters such as those used by web-based email clients. Data URIs must be smaller than 32 KiB in Version 8.[3] Data URIs are supported only for the following elements and/or attributes:[4]

  • object (images only)
  • img
  • input type=image
  • link (data URI must be base64 encoded)
  • CSS declarations that accept a URL, such as background-image, background, list-style-type, list-style and similar.

Internet Explorer 9: Internet Explorer 9 does not have 32KiB limitation and allowed in broader elements.

like image 140
epascarello Avatar answered Sep 30 '26 18:09

epascarello



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!