It appears when you enable Mirage the following image:
<img width="160" height="120" border="0" src="/someimage.jpg">
… will get converted to something like this:
<script type="text/javascript" style="display:none">
//<![CDATA[
window.__mirage2 = {petok:"c9fc5cd1df3c9447399f0c7039521f3b193740a0-1563980696-86400"};
//]]>
</script>
<script type="text/javascript" src="https://ajax.Cloudflare.com/cdn-cgi/scripts/04b3eb47/Cloudflare-static/mirage2.min.js"></script>
<img data-cfsrc="/someimage.jpg" width="160" height="120" border="0" src="/someimage.jpg">
Is it possible to have the mirage2 script set to defer? The problem with this script is that it blocks the HTML parsing, and it causes a flash of the DOM from the point of this image on.
If this is already possible, let me know. If not, could this feature be added? I think there was a time where the images inline style was set to “display: none” which would definitely cause a flash if it wasn’t wrapped in an element that already had the dimensions set. Luckily this appears to be gone now. The blocking nature of the script can cause the same problem, though. When I remove the optimization, no DOM flash. When I add it in, I get the DOM flash.
Thanks for any information.
Best,
Shannon