JPG or PNG: which is the best?

jpg vs pngToday I will talk about this great question with which every designer has had to deal: it is better to use the JPG or PNG for images to be displayed in the web?
JPG format was the undisputed and most common in the web until the arrival of PNG. What is the best?

The main feature of the PNG format is the ability to maintain the transparency, as the obsolete GIF, but with a degree of resolution much more faithful to the original image.In addition, the PNG file is displayed progressively as compared to a JPG image.

When a file is saved in JPG you can select the degree of quality so deciding the right balance between quality and image content. We can define that our image is lossy (with loss of information and decreasing the weight of the image) or lossless (no loss of information, but with more weight).

However the two formats compress images with different methods.
So generally it is recommended to use the JPG format images such as photos, while the PNG format is best suited for images with geometric shapes with little variation of colors.

Always remember, however, that only the PNG format can keep the background transparent.

Which format to use when you insert an image in your newsletter?

Stay tuned!