I have an .NET application which loads images dynamically. I have a loading gif shown until the image loads. Then the image is shown.
The loading gif image size is 16x11
.
The images that are loaded are all resized to 80px
width.
This code works in IE8-10 (But not in IE11):
$(imagesToLoadList).each(function () {
var image = $(this);
var realSrc = image.attr('real-src');
var demandedImageIndex = parseInt(categoryId) + (scrollCount * 10) + index;
image.unbind();
image.bind('load', { ImageIndex: demandedImageIndex }, ImageLoaded);
image.attr('src', realSrc);
index++;
});
function ImageLoaded(event) {
//after image loaded
}
In IE 11, the image loads but it does not resize to 80px
and stays16x11. It will resize correctly when the event is fired again. (App has a slider, so load event is called every time slide is changed).
Any ideas on how to fix this?
FYI, doesn't matter if the image is cached or not. Thinking along the lines of the IE8 bug