Home > Weblog Archive >  2007 >  April >  17


       

Local image URL syntax??

Tuesday, April 17, 2007 by Dave Winer.

I have a folder of images on my local diskPermalink to this paragraph

If I drag one onto the Firefox icon in my toolbar, it displays.  Permalink to this paragraph

The URL in the address bar is: Permalink to this paragraph

file:///flickrPics/pic42688.jpg Permalink to this paragraph

However, if I use that URL as the src attribute on an img element, I get a broken image. Permalink to this paragraph

<img src="file:///flickrPics/pic42688.jpg"> Permalink to this paragraph

Question: Is there a way to get the browser to display an image coming from the local file system, and if so, what's the syntax for the URL? Permalink to this paragraph

Sam Yates says it might be a Firefox security feature.  Permalink to this paragraph

Via email, Wendy McCully writes: "As long as the HTML file that references the local images is in the same directory as the images themselves, you don't need to indicate any path at all." I tried it -- and it works, without changing the browser's security settings. Permalink to this paragraph





© Copyright 1994-2007 Dave Winer Mailto icon.

Last update: 4/26/2007; 12:44:56 PM Pacific. "It's even worse than it appears."

Click here to view blogs commenting on  RSS 2.0 feed.