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!

5 comments:

Pri1 said...

It could be a GIF or a PNG

farrbott said...

Just had this very thing, changed .jpg to .gif and have been opened by Photoshop CS3 on Mac, thanks J

Lemy said...

The problem is on the file. It looks like ".jpeg" but its not. So I what did is just open the file with MS-Paint and save it as JPEG file and it worked. The file now can be open on CS5 or maybe other versions too. Just try and see!!!! Hope it helps!

nightace said...

Thanks a lot man. I finally got the solution to my problem. Never thought it is so trivial.

MazeWalker | T said...

Thank you Lemy for your input.