问题
I can't figure out why this image (and others like it) will not display in IE7 or IE8. It displays perfectly fine in IE9, Chrome, Safari, Firefox, on Mac or PC and multiple versions of these browsers.
http://images.appletree.com/icon/woman_big.jpg
On the other hand, other images from the same server (when served either from S3/Cloudfront or my server) display fine. Like this:
http://images.appletree.com/tree.png
I've checked web-sniffer.net and the failing image above returns the correct content type of image/jpeg
. I've compared the response headers for the 2 images above and they are very similar aside from the wrong content-type. The bad image URL above resolves to Cloudfront (Amazon's CDN service drawing from S3). But even if I host the bad images on a regular server, they fail:
http://www.appletree.com/images/icon/woman_big.jpg
I'm thinking the bad images are somehow corrupted in a way that IE7 and IE8 throw up on while other browsers are able to deal with. Makes sense? Is there some kind of jpeg validator I can check?
回答1:
Your JPGs are in CMYK colour space that IE can't read.
Use a tool like Photoshop or IrfanView to store the images as RGB files (In IrfanView, just open and re-save; in Photoshop, there is an explicit conversion option.)
回答2:
Finally found a solution for image display problems with IE8.
After trying several recommended solutions, I reloaded IE8 and it cured the problem on both computers!
来源:https://stackoverflow.com/questions/7313466/some-images-wont-display-in-ie7-or-ie8