displaying images on a network wite firefox
August 26, 2005 8:13 AM

Is there anyway to get firefox to display images located on my office's network?

I run a little web app off of apache, located on my workstation (so my page's path is something like c:/apache/index.php). I'd like to be able to display images that exist on the network.

<img src="j:/whatever/blah.gif"$#60; works just fine with IE, but I as far as I can tell firefox won't show them.

Are there any extensions that do this? Or any hacks that fall short of using PHP to copy the images off of the network and store them in a sub directory of c:/apache/? Or maybe it's I'm just using the wrong syntax?
posted by miniape to Computers & Internet (8 answers total)
Try using the syntax:
file:///j:/whatever./...
posted by gus at 8:20 AM on August 26, 2005


Using [img src="file:///c:/whatever/blah.gif"] seems to work for me in Firefox. It also seems to work in IE 6. On preview, what gus said. But with the added info that it works for me in IE.
posted by skynxnex at 8:22 AM on August 26, 2005


That syntax works when I use the full path from my harddrive to get to the page (e.g. type in the URL c:/apache/index.php), but I'm using php on the locally installed webserver and if I want the page to process the php I need to access it with localhost/index.php. When I do that it doesn't display. Unless of course I'm on IE.

Any other thoughts?
posted by miniape at 8:53 AM on August 26, 2005


That's an entirely different problem, and you should use http://localhost/index.php. If you don't specify the protocol (http or file, in this case), then you will be retrieving from the protocol used on the current document, which is not what you want. Perhaps the authors of IE have chosen to create some new behavior outside the realm of web standards. Wouldn't be the first time.
posted by grouse at 8:59 AM on August 26, 2005


Firefox blocks access to local images (file://...) when the HTML page is non-local (http://...) for security/privacy reasons: Otherwise, malicious sites could determine using Javascript if a certain file exists on your hard drive.

According to the release notes for the Mozilla Suite, you can specify a different behavior for specific sites by using custom Configurable Security Policies. This probably works for Firefox, too.
posted by ltl at 9:39 AM on August 26, 2005


Antoher though, could you set it up using a Alias directive in the httpd.conf or .htaccess file? Something like:

Alias /pictures/ "j:/path/to/images/"

I haven't tried this on Windows, but this works with Apache on Linux.
posted by gus at 10:02 AM on August 26, 2005


A million thanks to all. Adding the line to httpd.conf did the trick. Everything else was good information.
posted by miniape at 10:29 AM on August 26, 2005


If it's stored on a shared network drive you can try:
smb://server/folder/image.jpg
or
cifs://server/folder/image.jpg
or
\\server\folder\image.jpg
posted by blasdelf at 6:54 PM on August 26, 2005


« Older Will people moving to the US be taxed if they keep...   |   Metal, dude. Heavy metal. Newer »
This thread is closed to new comments.