SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Unable to open image in browser

    I want to bring an image in mozilla internet browser or google chrome by the html programming. But whenever i use <img> tag with the image path in dreamweaver, the image dont appears in the browser. Cant understand the problem. plz help?

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2011
    Location
    South Africa
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,692
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Which path are you using?

    What is the absolute path to the image?
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  4. #4
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by C. Ankerstjerne View Post
    Which path are you using?

    What is the absolute path to the image?
    i am using the absolute path to the image starting from the drive to the image name.

  5. #5
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,234
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    i am using the absolute path to the image starting from the drive to the image name.
    when you say you can't see this with dreamweaver, is your code being uploaded to a server?

    If the page is online, you don't use your drives. You use path from the server.

    But if this is still all local on your machine, your path must still be wrong... test by typing in the path from drive in the address bar. If the path is right, you'll see the image. If it's wrong you might see a message saying file doesn't exist. (I don't have windows so I'm not sure what it says)

  6. #6
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy

    Quote Originally Posted by Stomme poes View Post
    when you say you can't see this with dreamweaver, is your code being uploaded to a server?

    If the page is online, you don't use your drives. You use path from the server.

    But if this is still all local on your machine, your path must still be wrong... test by typing in the path from drive in the address bar. If the path is right, you'll see the image. If it's wrong you might see a message saying file doesn't exist. (I don't have windows so I'm not sure what it says)
    the server is local. i already checked the image path name in the address bar. I this case, the browser shows the image. But whenever i try with html in dreamweaver, the browser fails to show it.

  7. #7
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,692
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Can you post the code of the img tag?
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  8. #8
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by C. Ankerstjerne View Post
    Can you post the code of the img tag?
    Its- G:/Files/image.jpeg

    The above path i am using in html programming, in the <img src=""> tag.

    After running in the dreamweaver, the address shown in browser, is-

    file:///G:/Files/WEB%20PROGRAMS/HTML%20PROGS/html-prog1.html

    But the image dont shows up.

  9. #9
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    The IMG has to be relative to the page and somewhere wasn't the word 'server' used in which case it's very unlikely the file:// will be the correct URL. It also looks like the image is at a higher level than the page in question and DW is working from somewhere else for the site.

  10. #10
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Try changing the extension from .jpeg to .jpg. That might do it.

  11. #11
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,692
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Try changing the path to ../../image.jpeg. Even if this does work, however, it is unlikely to work on a web server.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •