Previous / Next


Scripting News, the weblog started in 1997 that bootstrapped the blogging revolution.
Local image URL syntax??

I have a folder of images on my local diskPermanent link to this item in the archive.
If I drag one onto the Firefox icon in my toolbar, it displays.  Permanent link to this item in the archive.
The URL in the address bar is: Permanent link to this item in the archive.
file:\///flickrPics/pic42688.jpg Permanent link to this item in the archive.
However, if I use that URL as the src attribute on an img element, I get a broken image. Permanent link to this item in the archive.
<img src="file:///flickrPics/pic42688.jpg"> Permanent link to this item in the archive.
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? Permanent link to this item in the archive.
Sam Yates says it might be a Firefox security feature.  Permanent link to this item in the archive.
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. Permanent link to this item in the archive.



     

Last update: Thursday, June 3, 2010; 4:00:41 PM



~About the Author~

A picture named dave.jpgDave Winer, 55, is a visiting scholar at NYU's Arthur L. Carter Journalism Institute. He pioneered the development of weblogs, syndication (RSS), podcasting, outlining, and web content management software; former contributing editor at Wired Magazine, research fellow at Harvard Law School, entrepreneur, and investor in web media companies. A native New Yorker, he received a Master's in Computer Science from the University of Wisconsin, a Bachelor's in Mathematics from Tulane University and currently lives in New York City.

"The protoblogger." - NY Times.

"The father of modern-day content distribution." - PC World.

One of BusinessWeek's 25 Most Influential People on the Web.

"Helped popularize blogging, podcasting and RSS." - Time.

"The father of blogging and RSS." - BBC.

"RSS was born in 1997 out of the confluence of Dave Winer's 'Really Simple Syndication' technology, used to push out blog updates, and Netscape's 'Rich Site Summary', which allowed users to create custom Netscape home pages with regularly updated data flows." - Tim O'Reilly.

Mail: Mailto icon scriptingnews1mail at gmail dot com.

April 2007
Sun
Mon
Tue
Wed
Thu
Fri
Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Mar   May


RSS feed for Scripting News



© Copyright 1997-2010 Dave Winer. Last build: 6/3/10; 10:26:26 PM. "It's even worse than it appears."


Previous / Next