0

I have a jpg image and when i do

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

it doesnt show up. if i put another jpg and call it logo.jpg it does. What could possibly be wrong with this jpg that html doesnt like it.

5
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by digital-ether
0

Make sure that the image extension is 'jpg'. Sometimes JPEG image has the extension 'jpeg'.

0

If it doesn't show up then try renaming it. Make sure you haven't accidently saved the picture as a .gif or .png file

Hope this helps
Regards
Joe

0

Also make sure that you are calling it from the right directory. From what i understand from your post, the first one (that doesn't show up) you call via going into the images folder and then finding the logo, whereas the second one you mention, you call it straight from the folder that your html page is in.

0

If it doesn't show up then try renaming it. Make sure you haven't accidently saved the picture as a .gif or .png file

Hope this helps
Regards
Joe

Just an interesting point.

The file type is not determined by the name extension (such as jpg or png), it is determined by the Content-Type HTTP header.
See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17

So you can name your jpg files with a png or even an arbitrary extension such as zzz and the browser should still show it as long as the server serves the correct content type, or the browser determines it is an image through other means - actually reading part of the file.

@mrjoli021

Visit the URL of the image in your browser.
eg: yoursite.com/images/logo.jpg

See if the image shows up.

Another thought.
If you use firefox, you can use the firebug extension to track the HTTP requests recieved for a page. The image should be one of them. It will also tell you the HTTP response from the server for that image, it should give a HTTP status of 200. If it is something else, then there is a problem. Maybe the image is not readable by the server.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.