Forum : <img src="/images/myfirstimage.gif" > Problem...
Brief description  about Online courses   join in Online courses
View Avraham  Venismach 's Profile

<img src="/images/myfirstimage.gif" > Problem...

This relative path <img src="/images/myfirstimage.gif" alt="alien pic"/> doesn't bring up the picture. What am I doing wrong? I have the picture stored in my_website/images. When I write it like this: <img src="../images/myfirstimage.gif" alt="alien pic"/> This picture shows up. Why doesn't it work without the ..?
Asked by Avraham Venismach | Dec 31, 2009 |  Reply now
Replies (6)
View akhilesh kumar joshi 's Profile
.. moves u to parent forlde of the current execution
Jan 16, 2010
View narasimharao pv 's Profile
May be you can try this...
1. create a new folder on your desktop.
2. create a subfolder images within the above folder
3. Put the html file in folder (created in step1)
4. put images in the subfolder (created in step2)
5. update the html page for img src="images/abc.jpg" (path to image).
Jan 3, 2010
View avraham venismach 's Profile
for some reason it doesn't work for me... only if I add ../ will it work. Any ideas where I'm going wrong?
Jan 3, 2010
View sanjay s nair 's Profile
No thats Fine.

So there will be html files inside the "my_website" folder of your desktop. And the "images" folder will be inside the "my_website" folder, which contains all your images.

If above things are right, everything should work fine.
Jan 3, 2010
View avraham venismach 's Profile
I have the my_website folder on my desktop. Should it be stored somewhere else?
Jan 2, 2010
View sanjay s nair 's Profile
root = /
site folder = /my_website/
image folder = /my_website/images/

All the html files will be stored in the site folder
All the images will be stored in the image folder
Then <img src="images/myfirstimage.gif" alt="alien pic"/> will work.
Jan 2, 2010