ArticlesWeb Design

Why Do Images Disappear from a Webpage?

read ( words)


In learning webpage design, I encountered many problems that took lots of practice to resolve. Although, I was building web pages using Microsoft Frontpage on my home computer, I used to face lots of issues after uploading the webpage to my website.

One major problem was the disappearance of an image file from the webpage. When I created the webpage on my home computer, it looked exactly the way I planned it. Both the text and images showed on the webpage.

When I uploaded the webpage my web server space, they images showed as the letter X in the middle of a blank frame.

After lots of searches, I found out that the problem can only be fixed by modifying the HTML of the web page having the problem.

The HTML code I had to change was very simple and straight forward, when locating the code related to the image.

Whether the webpage has one or more image, you use the same method to modify the code. You just have to fix one at a time.

The rule for an image to appear correctly, is to save the images in the same directory as the webpage where the image is supposed to appear.

Whether you create a webpage on your home computer or your web server, the same rule applies.

When you upload the webpage to the web server, the website looks at the webpage an sees the image source as the hard disk of your computer. This is why it can't display it. The image source should be in the directory on the website.

Here is the solution to this problem:

Every image file on a webpage is embedded in the IMG tag, and the exact location of the image file shows as a value for the SRC attribute. For example, SRC = "image.jpg" is one of the format that an image appears in.

Correcting the SRC value, will correct the problem that causes the images to show as the letter X. The SRC tag attribute means the source location of the image file. When the webpage was designed on your home computer, the source value was your computer hard disk.

In summary, before you upload a webpage with picture, you should change the Html code of the image.

All what you need to change is the SRC value from your hard disk to your website directory.

For example: Change this code SRC="C:image.jpg" to SRC="index.html" if the webpage happens to be your home page. If the page was not the home page, you can just replace index.html with the name of the page.

Article published by George Chamoun. Join my list for tips about HTML coding, web page design, and website building. Get your free 7 part HTML tutorial. It is free, and you can unsubscribe anytime. http://www.HowToUseHtml.com

Rate this article
Current Rating 0 stars (0 ratings)
Click the star above that marks your rating