1

I'm using lightbox2 to display a data uri on Edge/IE11. Tiny images work fine while larger images(Not huge) get cut off at some point. Edge/IE don't have full support for data URI's but, if you use the debugger to cut paste the data uri from the href to the img tag the image will display fine. For some reason in moving the data from the href to the img tag it is cut off.

<html>
    <head>
        <link rel="stylesheet" href="/path/to/lightbox.css">
        <script src="libs/jquery/3.3.1/jquery.min.js"> </script>
        <script src="/path/to/lightbox.js"></script>
    </head>
    <body>
        <a href="data:image/png;base64,…" data-lightbox="image-1" data-title="My caption">Image #1</a>
    </body>
</html>

http://jsfiddle.net/knc6j2o7/7/

Alex Collins
  • 560
  • 5
  • 18
  • I am experiencing a similar problem with images being truncated. The a.href attribute does only contain the first 5K of the data, while the img.src attribute does contain all the data. Originally I thought that the size restriction in IE Data URI was the problem. But that is not the case. I have just found that the document.location or anchor tag limit is set to 5120 in IE (see https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers). I think that is the root of the issue Have you found a solution? – Ben Ootjers Nov 15 '18 at 08:14

0 Answers0