Shamik
Shamik

Reputation: 7108

Why IMG tag of HTML renders null on Firefox?

<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?

Upvotes: 2

Views: 3680

Answers (5)

Eric Wendelin
Eric Wendelin

Reputation: 44349

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.

Upvotes: 0

Matthew Wilson
Matthew Wilson

Reputation: 3929

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

Upvotes: 1

alexn
alexn

Reputation: 58962

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

Upvotes: 1

Jason Cohen
Jason Cohen

Reputation: 83021

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.

Upvotes: 2

Eddie
Eddie

Reputation: 54421

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.

Upvotes: 4

Related Questions