homepage Welcome to WebmasterWorld Guest from 54.205.241.107
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Browsers / Opera Browser Usage and Support
Forum Library, Charter, Moderator: open

Opera Browser Usage and Support Forum

    
Opera not showing local images
opera not showing local images ie is
topr8

WebmasterWorld Senior Member topr8 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 430 posted 10:52 am on Jun 16, 2005 (gmt 0)

opera 7.54

am building a local app

and am calling images embedded in an html page from the local file system like this:

<img src="file://localhost/d:/image.jpg" border="0">

and the image is not showing on the page!

what is happening:
IE displays the images fine
but firefox and opera don't

firefox and opera will both display the image if i just put
file://localhost/d:/image.jpg
directly into the address bar.

obviously for some reason they don't want to show local files embedded in an html page, is this some kind of security issue or do i have the syntax wrong?

 

BlobFisk

WebmasterWorld Senior Member blobfisk us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 430 posted 9:43 am on Jun 17, 2005 (gmt 0)

Strange! Is the a specific reason why you wouldn't consider relative links?

kaled

WebmasterWorld Senior Member kaled us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 430 posted 9:52 am on Jun 17, 2005 (gmt 0)

Use conventional urls for your images, etc and everything should be ok.

Since there is normally no way to know on what drive a file will be, using drive-specific urls is lunacy.

You may begin urls with / if they must be relative to a drive root but, as BlobFisk said, relative urls is the way to go unless you have a specific reason otherwise.

Kaled.

victor

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 430 posted 10:40 am on Jun 17, 2005 (gmt 0)

This is partially an Opera verion problem. Later versions (in my experience) work with the code you have.

I assume you are working in the same sort of way that I am: the webpages having their full links expanded when uploaded. When uploaded to a remote destination they become [test.com...] and when uploaded to a loca desination they become file://localhost/yadda-yadda

I do that all the time. As it is automatic (controlled by the software), I never have to worry about relative or absolute URLs. They all become absolute on upload, thus reducing 302 hijacking risks.

Also, it works fine with my partner who uses a MAC. The local file paths get correctly converted.

So: no problem with what you are doing. May be a problem with the version of Opera. I used to have the same problem. Don't any more.

Hester

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 430 posted 3:13 pm on Jun 17, 2005 (gmt 0)

You could try setting the base URL [w3schools.com] in the code at the top, then just change it or take it out when it goes on the web.

topr8

WebmasterWorld Senior Member topr8 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 430 posted 4:58 pm on Jun 17, 2005 (gmt 0)

thanks for the feedback...

>>Strange! Is the a specific reason why you wouldn't consider relative links?

i'm using xp pro and iis only allows 1 website (i know i can change this around but when i'm just working briefly on another project i don't want to be bothered with changing the settings)

in this case i'm running scripts in a virtual folder in the 'local 127.0.0.1' website but i just want to access/view images that are not under the root and i don't want to keep creating virtual folders under the root for the image folders (which would be a solution of course) its easier just to hard code the path into the script page.
the image folders are on seperate drives to the web server.

to be honest i'm not sure what the relative path would be bewteen
127.0.0.1/folder/script.asp (iis located on c drive)
and
d:/folder/image.jpg

would be and indeed if it is possible to link in that way.

>>Since there is normally no way to know on what drive a file will be, using drive-specific urls is lunacy.

yes agreed, but in this case, this app is for my own use on my own local computer and i do know what drives are located on.

victor >> yes pretty much on the money this is just local stuff, when its uploaded to the live server it all links up properly, thanks for the tip, i'll prob just have to upgrade opera been meaning to anyway.

>>You could try setting the base URL in the code at the top

good idea but don't think it will work as i'm trying to access the file system outside of the website root anyway, plus if i set the base to d: for instance all the other links would be thrown off. - could be wrong on that.

the main point is the link DOES work in IE and according to Victor in later versions of Opera, so it prob is a bug that i'll best get around by either using IE when i'm working with this until i upgrade opera.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Browsers / Opera Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved