Reputation: 211
I'm trying to display to the enduser an image, but this tag wouldn't work, how can I fix it please ?
<img src="file:///E:/images/avatars/21082013184506Id.png" height=70 width=70 />
Thanks in advance.
Upvotes: 0
Views: 117
Reputation: 122
as John asked in the comment, the image will only appear when the source path specified is available to user viewing the html.
The attribute src="file:///E:/images/avatars/21082013184506Id.png" means the user must have access to E: drive.
If you want this to work online on the internet, upload the image with your page and specify path to it e.g. in case it is in same folder as you html
src="21082013184506Id.png"
if it is in images/avatars subfolders
src="images/avatars/21082013184506Id.png"
I would also recommend quoting the width/height attributes i.e. width="70" height="70", or even better set those values via CSS, but that a different topic :)
Upvotes: 0
Reputation: 1359
The image in src=""
is on your own hard disk.
Upload the image to a image-uploader like imageshack or a webserver.
Put in src=""
the correct path to the file.
Upvotes: 0
Reputation: 2139
your file addressing is absolute, It works just on the machine which that image exists on that directory, you should use implicit addressing.
Upvotes: 1
Reputation: 944490
file://
URIs from pages loaded over HTTP.Use an HTTP URI for your src.
Upvotes: 0