Wednesday, June 27, 2007

IE6 not displaying images

Here's a bug in IE6 that is worth remembering.

Situation:
All the thumbnails in a site I am working on display in FF, but some of them do not display in IE6. (Note: they all display fine in IE7).

I've ruled out mistakes in the img src field, and the images preview fine in the standard Windows preview utility.

Diagnosis:
Turns out some of these images are GIFs that have been saved with a .jpg suffix (i.e. someone has tried to convert them to JPEGs by changing the extension).

Now, Firefox can handle this little mistake fine, since it takes it's cue from the encoding of the image (I presume), but IE6 simply refuses to display the images.

How to tell:
If you suspect this may be the problem you're having, a good way to check is by trying to open the offending image in Photoshop, which is also incapable of handling this ambiguity, and throws up the following error
Could not complete your request because reading arithmetic coded JPEG files is not implemented.
Ah yes, the old arithmetic coded JPEG file... aka a GIF!