Search code examples
htmlpng

Why are png files not appearing in html


I have a logo that i am trying to make appear in my html page. For some reason it wont appear on my webpage. When i loud my webpage all i see is a square box with an x on it were the picture should be.

  <img src="/images/DigitalMonster-logo.png" />

That is the code im using to have the picture display from my hard drive. Any reason why it wont show up on my website? Also if you need the full html code let me know i will provide it thankyou.


Solution

  • Path /images/DigitalMonster-logo.png assumes you have images directory in very top of Document Root (absolute path). if you will change /images/DigitalMonster-logo.png to images/DigitalMonster-logo.png, this will assume your images directory is in current working directory, (relative path).