开发者

IE is not loading all images

开发者 https://www.devze.com 2022-12-25 09:05 出处:网络
I have jQuery 开发者_运维知识库code that loads images with jQuery load method. It works perfectly in all other browsers, except in IE. I have about 10 images, but IE only loads few of those images and

I have jQuery 开发者_运维知识库code that loads images with jQuery load method. It works perfectly in all other browsers, except in IE. I have about 10 images, but IE only loads few of those images and then stops loading. What could be causing this?

$(".image-container").each(function() { 

    ... some code here ...

    var img = $("img", this);

    $(img).load(function () {

        ... some code here ...

    });
});


I had an issue with I.E., where all browsers would load my images, except I.E.

I'm giving you this answer because while my issue wasn't with javascript, it had to do with images loading everywhere but not in I.E.

Turns out it was because some of the images were jpegs made by photoshop, that used a CYMK colorspace which IE don't support.

I used imagemagick to check the format (identify -verbose) and convert the images ( in my case something like convert -profile CoatedFOGRA27.icc -profile sRGB.icm ...

Again, I'm not sure this applies to your problem, but it doesn't hurt to check the format of your images. I hope it's useful.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号