Question

Try loading this normal .jpg file in Internet Explorer 6.0. I get an error saying the picture won't load. Try it in any other browser and it works fine. What's wrong? The .jpg file is just a normal picture sitting on the web server. I can even create a simple web page:

<a href="http://www.zodiacwheels.com/images/wheels/blackout_thumb.jpg">blah</a>

and use right click + save target as with IE6 to save it to my desktop, and it's a valid JPG file. However, it won't load in the browser!

Why?!

I even tried checking the header response and MIME type and it looks fine:

andy@debian:~$ telnet www.zodiacwheels.com 80
Trying 72.167.174.247...
Connected to zodiacwheels.com.
Escape character is '^]'.
HEAD /images/wheels/blackout_thumb.jpg HTTP/1.1
Host: www.zodiacwheels.com

HTTP/1.1 200 OK
Date: Wed, 20 Aug 2008 06:19:04 GMT
Server: Apache
Last-Modified: Wed, 20 Aug 2008 00:29:36 GMT
ETag: "1387402-914ac-48ab6570"
Accept-Ranges: bytes
Content-Length: 595116
Content-Type: image/jpeg

The site needs to be able to work with IE6, how come it won't load a simple .jpg file?

Was it helpful?

Solution

The JPG you uploaded is in CMYK, IE and Firefox versions before 3 can't read these. Open it using Photoshop (or anything similar, I'm sure GIMP would work too) and resave it in RGB.

edit: Further Googling makes me suspect that CMYK isn't really a part of the jpeg standard, but can be shoehorned in there. That's why some software does not consider the file valid. It does however open just fine in Photoshop CS3, and shows a cmyk colorspace.

OTHER TIPS

It won't load in IE7 on my Vista x64 box. Also Paint.net won't save the file, saying "There was an unspecified error while saving the file."

EDIT:

In paint.net I did a Select All, New File, Paste, Save, and now it works fine. I'm guessing that file has some weird corruption.

You can use jpeginfo to find out if a jpeg file is OK or not.

$jpeginfo -c blackout_thumb.jpg

blackout_thumb.jpg 240 x 240 32bit Exif N 595116 Unsupported color conversion request [ERROR]

In your case the file is corrupted which explain why some browsers cannot display it.

The file is probably not a fully valid JPG and IE6/7/8 (I tested on IE8 and it wont load). Other browsers are a bit more defensive and can load it, but perhaps IE team choose not to load it as it could be invalid in a way that causes a security hole.

As Ryan Fox says, open it in an editor and re-save it ... where did the image come from, if it came from an editor dont use that editor again.

Edit: I opened it an Paint Shop Pro and it had an unknown color palette so had to convert it ... perhaps that is the problem. You could report it as a bug to the IE team and see what they say.

It is possible for other applications to register themselves as a handler for files with a particular extension. Quicktime has (or at least had) a tendency to do this with .png files, so a .png file would display fine inline in an HTML page, but with an URL referring directly to the .png file, IE would immediately delegate all responsibility for handling the file to Quicktime.

Might this be what is happening to your .jpg files? Is it only this .jpg file that you're having a problem with?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top