How do you retreive images from the root, when the HTML is in a sub directory

Discussion in 'HTML & Website Design' started by cscott5288, Jan 27, 2009.

  1. #1
    OK, so im in a bit of a dilemma. I have several pages on my site that are in a sub directory: www.mysite.com/thesubdirectory/article.html, and the images in the page are local (there is a folder called "images" in www.mysite.com/thesubdirectory/). So the code for each image is <img src="images/blahblahblah.jpg">.

    Now I want it to retrieve all images from a folder in the root, www.mysite.com/images not thesubdirectory/images. Do I have to go in and put <img src="http://www.mysite.com/images/blahblahblah.jpg"> for each individual image or is there an easier way to retrieve the image from a folder in the root?

    Also, if there is no other way, I wan't to know if loading each IMG from an http:// source will slow down my page load time as opposed to if I retrieved the image locally or are they essentially both considered local?

    Thank you future problem solvers!
     
    cscott5288, Jan 27, 2009 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    image file in same directory file.gif
    in a folder in the same folder ./folder/file.gif
    up one folder (parent) ../folder/file.gif or ../file.gif if not in a subfolder of parent
    up two folder ../../folder/file.gif
     
    Colbyt, Jan 27, 2009 IP
    cscott5288 likes this.
  3. cscott5288

    cscott5288 Active Member

    Messages:
    912
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #3
    thank you very much colbyt! your answers are always very helpful. rep added.
     
    cscott5288, Jan 27, 2009 IP