Join
the community
Sign-up
Ask a question »

Images are not displayed on my website! What can be done?

May 2013


Images are not displayed on my website! What can be done?



In a web page, the images are specified with the IMG tag, using the following notation:
  • <img src="name_of_image.ext"> 


The image format commonly used on the web are GIF, JPG and PNG. Its better to avoid using formats that are not recognized by the W3C (World Wide Web Consortium)
  • Make sure that the image name contains no spaces or special characters (such as accents).
  • With some browsers, the characters are encoded with "%" character .
  • For example, an empty space is represented by "% 20".
  • If the "%" character is present in the address, it means that the file name is incorrect.


In addition, the file path should preferably be specified as relative path:
  • If only the name of the image is specified, the image must be in the same folder as the html page, otherwise it *must indicate its relative location ( ../folder/img.jpg )


It is also possible to specify the full path, for example:

And as for all the links, the path to the image must be exactly the same in the page and throughout the site.
  • Note the the file name are case-sensitive.
  • For example, if the image is in: myimages/image_1.png
  • the link must be written as such:
    • <img src="myimages/image_1.png"> 
  • and not:
    • <img src="MyImages/image_1.png"> 



See also

Knowledge communities.

Les images ne s'affichent pas sur le site
As imagens não aparecem no site
As imagens não aparecem no site
By pintuda on May 24, 2011
Original article published by Jeff. Translated by deri58.
This document entitled « Images are not displayed on my website! What can be done? » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.
Receive our newsletter

health.kioskea.net

How to display the IP address of a visitor?
Webmaster - Fonts in web pages