1

i would like to display images on my website that are stored on a visitors local filesystem.

Assuming I have the location of the image on the visitors drive (e.g. c:\Documents And Settings\Ropstah\image.png), is it then possible for me to display this image in my internet website (e.g. www.website.com)?

The images won't seem to load when i use the following syntax (Internet Explorer 7, Firefox 3 etc..):

<img src="file://c:\Documents and Settings\Ropstah\image.png" />

The images DO display if the .html file (which i use on website.com/index.html) is located on my local pc...

6
  • 1
    No, bad web developer! Bad! Stay. Commented May 17, 2009 at 20:06
  • Sorry? Images which are re-used over and over again might as well be loaded from the harddrive (where caching fails). This improves both the user experience with regards to response times, as well as the server bandwidth looking at the amount of data that needs to be downloaded with every request... Commented May 18, 2009 at 1:43
  • Lol, I wonder if @Will uploads all the files that are locally in the Server to show to 20k+ customers looking up items in their website. Commented Mar 16, 2014 at 3:01
  • @steven You want websites to be able to pull images from anywhere on your local disk? Protip: websites often host their own images, serving them to clients on request. Check into it. Commented Mar 16, 2014 at 16:04
  • @Will if you own the server that is Hosting your website. You are hosting the Website App, And lets say all the photos that the client upload or whatever are stored locally in your harddrive... how would you display these back to the User if he wants to see them or maintain them? Commented Mar 16, 2014 at 19:52

4 Answers 4

4

This sounds like security settings on the web browser, which are probably set to a level that prevents local filesystem access for an internet site.

Security settings can be edited by users, in a way specific to each browser. for example for IE it's Tools -> Internet Options -> Security

Sign up to request clarification or add additional context in comments.

1 Comment

I know it's security settings, is there a workaround for all browsers? It doesn't matter if visitors have to make changes to security settings at all, just want to know if it's possible...
1

You can if the user sets your site to be in the Trusted zone.

2 Comments

I see this doesn't work for Firefox. Maybe it does for IE, i'd have to check tomorrow.
If this doesnt seem to work, go check out travian.com. It's an online browser game that lets you download a 'media pack' which installs (I think its a zip file) all the site's graphics on your system so as to speed up render times.
0

You can't.

Stupidly, these browsers have decided to close "security holes" by not allowing public web pages to disable local content.

Comments

0

Using pure HTML you cannot access files stored on users' computers. You could instead use Flash, Java Applet, ActiveX, Silverlight, ...

1 Comment

I really need to display images (png), other options are not available... :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.