1.

Solve : HTML images?

Answer»

I can't get my images to DISPLAY in my HTML files. It displays the alternate text and a small icon of an image tile. I have the complete path defined in my HTML pages, starting with the C:/Users/ivanspires/Documents/spiresHTML/images/ivan1.jpg and it still does not display anything except the alternate text and an image icon. On my web host the images displays fine with a path leading to the folder named images which contains the image of ivan1.jpg I can't seem to figure this out, I have also checked the advanced browser options and made sure the "Show images" box is checked. When I right click on the image and select "Show image" it still does not display the image. I am at my wits length and see no resolution to this problem, can you help me??? Quote

I can't get my images to display in my HTML files. It displays the alternate text and a small icon of an image tile.
You mean when TRYING to view your pages offline, from your hard drive, right?  I see you have a folder named images on both your host server and your hard drive.  Right?  Do you have your HTML files on your hard drive in spiresHTML?  If so, then the path in the code for displaying the image could be the same whether viewing your page online or offline.  Agree?    Some code to work on would be nice......The path should be the same but it still doesn't work! I have changed the path, MOVED pictures into the spiresHTML folder and it still doesn't work! It works at the web site I have my HTML pages posted to, but not on my computer at home! Quote from: kpac on July 11, 2009, 04:47:45 AM
Some code to work on would be nice......

Or a link at least....When you want to insert images into an HTML file, you should ALWAYS use the relative path to the image.

Assume you have the following directory: C:\DOCS\HTML
In this folder you store all your HTML files. Under the folder HTML you have a subfolder called IMG: C:\DOCS\HTML\IMG.
This is the folder where all the images are stored.

Now when you want to display an image on your webpage, you should never do this:



Instead use it like this:



Why is this so important you might think?

Well it's simple. When you upload your webpage (html plus images) to a webserver, there is no C:\DOCS\HTML\IMG folder.
It works great when you create webpages on your local computer, but it goes wrong when you upload the webpage to a webserver. Quote from: Astoria on July 12, 2009, 11:41:15 AM
When you want to insert images into an HTML file, you should always use the relative path to the image.

Assume you have the following directory: C:\DOCS\HTML
In this folder you store all your HTML files. Under the folder HTML you have a subfolder called IMG: C:\DOCS\HTML\IMG.
This is the folder where all the images are stored.

Now when you want to display an image on your webpage, you should never do this:

<img src="c:/docs/html/img/image.jpg">

Instead use it like this:

<img src="img/images.jpg">

Why is this so important you might think?

Well it's simple. When you upload your webpage (html plus images) to a webserver, there is no C:\DOCS\HTML\IMG folder.
It works great when you create webpages on your local computer, but it goes wrong when you upload the webpage to a webserver.
And, in this example, he needs to be sure he has a folder named img on the web server, also.  Doesn't matter whether you name your folder img or images or something else, just be sure the folder name for your images is the same on both your PC and the web server.    Alright, It sounds like you have the same problem my Aunt did, as it cannot find the path.


I would recommend instead of pathing it from your PC pictures, upload it to a site that holds on to them, such as Http://www.tinypic.com/ , or Photobucket, but I don't use that often.

This resolved the problem for my Aunt,


Regards,


Discussion

No Comment Found