IE11 changes html code for images

Hi,

As of this morning, upon loading my webpage in IE11, html code for images is somehow changed by IE11. One example:

<div class="image">
<img alt="" src="images/kind.jpg">
</div>

in the page html code is changed by IE11 into:

<div class="image" style='background-; background-image: url("images/kind.jpg"); background-repeat: no-repeat; background-size: cover;'>
<img style="opacity: 0;" alt="" src="images/kind.jpg">
</div>

So it converts an img image into a background-image and enlarges it to cover the whole area. This happens for most jpg, png and svg pictures (but not all). No problem in other browsers. This didn’t happen before.

Anyone any idea what is causing this behavior?

This second set of code is what you see in “view source” in IE11 is it?

What do you see if you view source in Firefox or Chrome?

Looks like you have an object:fit script running as IE11 doesn’t support the css object:fit property.

Just a guess :slight_smile:

Thanks, PaulOB!! That’s indeed what was happening. I found the script in one of the js files. I am still surprised that it only popped up this morning, but I’m glad the issue is solved! :grinning:

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.