Which format is better between JPG and PNG for an image on your website?


This question comes up every time I try to save an image. So I decided to read about this topic from writing on the Internet.

I got on google and found a few good articles about the answer for this question. The answer is “it depends”. The rule of thumb is as follows:

If it is a photo with gradient, then use JPG. If it is an image with line arts and blocks of solid colors, then use PNG. If you want viewers of IE6 to see the image, then use JPG.

One excellent article is by Liraz Siri, on turnkeylinux.org, PNG vs JPG: 6 simple lessons you can learn from our mistakes.

Another good article is on howtogeek.com: “What’s the Difference Between JPG, PNG, and GIF?” This article discusses about GIF for people want to know more about GIF.