Solved: Internet Explorer doesn’t display local images

Recently I wrote a simple HTML page with some images (or better: Wrote a C# tool that wrote a simple HTML page and some images), stored it on my local machine and everything worked fine in Firefox.

But I couldn’t bring good old Internet Explorer 6 to display the locally saved images – it only displayed the well-known red X. Since it worked in Firefox, I was sure that the path to the images was correct (it was something like "file:///c:/image.bmp"). Some forum posts told me that I obviously screwed something up with my file associations in Windows, but the solution was far simpler:

It turned out that the images had the wrong file extension (I had ".bmp" but the images were PNG). After fixing this, Internet Explorer worked like a charm and displayed the images as it should. It seems that IE doesn’t display local images that have the wrong file extension, but does so with remote (HTTP) images. I guess this is not really another IE bug, but because of security considerations.
Nevertheless, it took me an hour or two to figure this out …

Ein Gedanke zu „Solved: Internet Explorer doesn’t display local images“