Should you use GIF, JPG, or PNG when adding images to your website?

What Website Image Format is Best: GIF, JPG, or PNG?Should you use GIF, JPG, or PNG when adding images to your website? Good Question.

The answer: It depends.

There are several points to consider when you are adding images to your website:

  • Is the image a photograph? If so, use JPG. You’ll get the smallest file size for the image quality.
  • If the image is not a photograph, use PNG. You will get very high quality and a small file size. However, you can also use GIF for non-photograph images and get good results.
  • Does the image need to be transparent? For example, if you have an image that is a cross and you want the background of the cross to be transparent so it will show the background color of anything behind it, then you need to use a PNG or GIF (JPGs cannot be transparent). PNGs have much better quality for transparencies, but PNG transparencies do not work in Internet Explorer 6 (still about 15% of browser use). You can find a javascript to correct this problem, but it can be difficult to implement and it doesn’t work on background images.
  • Always pick the smallest file size. If you try PNG, JPG, and GIF and they are all of the same quality, use the file with the smallest file size. The smaller your image file size, the faster your page will load.

Tags: , ,

Leave a Reply

You must be logged in to post a comment.