I'd like to be able to specify a local file path for an image on a web page delivered via http using Chrome - is this possible?

I remember doing this using IE but cannot think how! Some trusted settings I think...

Cheers

link|improve this question
feedback

2 Answers

Non-local web pages cannot access local files in Chrome or any modern web browser.

You can override this using LocalLinks (for Firefox), but it will only work in your own machine.

link|improve this answer
feedback

in Chrome this looks like this

file:///C:/sample.txt
link|improve this answer
I'm after doing something like this, hosted on web, but looking at a users local files.... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">; <html xmlns="w3.org/1999/xhtml">; <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>example</title> </head> <body> <img src="file:///c:/graphics/image.jpg" height="200px" width="200px" /> <h1>Welcome</h1> <p>Hello world!</p> </body> </html> – JSH Dec 21 '10 at 15:29
1  
I just tried .html and .jpg files with the file:/// notation, both were renderd correctly. Could you post a screenshot that shows the address bar and some of the content? – Weltenwanderer Dec 21 '10 at 15:34
try jsh.learningict.net - obviously the image you won't have but the code shows you an idea of what I'm after – JSH Dec 21 '10 at 17:12
I can only guess that you are referring to the image tag, which also works fine when i replace the src with <img src="file:///c:\test.jpg" height="200px" width="200px"> c:\test.jpg is a valid jpg in that path and shows fine. – Weltenwanderer Dec 21 '10 at 17:19
wonder if it is an osx thing then? the src ref works fine alone in Chrome's address bar, just not in the HTML code – JSH Dec 22 '10 at 9:50
show 2 more comments
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.