tags:

views:

667

answers:

5
<html>
<body>

    <img id="j_id58" width="800" border="0" height="400" src="c:/test/tmp/imageEE3A7BA3F55BC67061FD778F1B0136D6.png"/>
</body>
</html>

Why does this not render any image when I open it on firefox but does it on IE 6?

A: 

This is likely because you need a src attribute with a file:\\ scheme.

Try file:///C://test/tmp/imageEE3A7BA3F55BC67061FD778F1B0136D6.png in the src and see if it works.

Eric Wendelin
+4  A: 

I bet this will work if you use a file:// URL instead of a filename.

<html>
<body>
<img id="j_id58" width="800" border="0" height="400"
     src="file:///c/test/tmp/imageEE3A7BA3F55BC67061FD778F1B0136D6.png"/>
</body>
</html>

Try that.

Eddie
This worked like a magic. Thank you so much.
Shamik
+2  A: 

Firefox doesn't support using the "C:/"-style path.

Instead use a relative URL or a real URL to that file hosted by a web server.

IE6 does support this.

Jason Cohen
+1  A: 

Firefox requires the "file:///"-prefix when referencing local files.

alexn
A: 

In addition to the answers above, this is likely to fail if you load your HTML from an HTTP server.

Matthew Wilson
A true classic... "But I see the images when I try it from my computer"... :)
Guffa