A simple rule for the PNG or JPEG dilemma

PNG or JPEGPNG or JPEG? Some bloggers know the answer to this question, and some don’t. The former are not necessarily better than the later, but knowing how to choose the correct image format gives you a competitive advantage.

This article could have been one sentence long: PNG is for text, JPEG is for the rest, but let’s get into some details.

Pictures with text

We recommend you to use PNG format for pictures containing text or graphics/drawings with fine details. Usually, JPEG images are blurrier, and the contours of the letters appear less sharp. The fine lines from graphics could be also altered.

Let’s see two examples of the same image in both formats:

 

PNG or JPEG - Example 1
Image 1 size: 22.4 kB
PNG or JPEG - Example 1
Image 1 size: 70.2 kB

 

The first image is clearer, but the text from the second image is also readable. If you decide that the JPEG format is good enough for displaying images containing text, please check their sizes. You will be surprised to find that in these cases the JPEG images are bigger.  Check the bellow table to see the size comparison for all images.

Important: Use PNG for logos and technical drawings too! This advice is specially true for the logos with gradients.

 

Regular images

On the other hand, JPEG images are usually smaller and better for the web. In other cases than banners or images with a lot of text, using PNG images slows your website, and in the most of the situations there are not visible differences between these formats. We recommend you to use PNG only if the text within an image is not readable.

 

PNG (351.4 kB)

PNG or JPEG - Example 2

 

JPEG (153.2 kB)

PNG or JPEG - Example 2

As you could see, there are not obvious reasons to use PNG in this case. JPEG format is just fine and it is smaller as you could see bellow.

 

PNG vs JPEG size comparison

We like tables, and we made a new one with the sizes for all above images and their optimized versions.

PNGJPEG
Image 1
(with text)
22.4 kB70.2 kB
ShortPixel
Optimized
6 kB25 kB
Image 2
(without text)
351.4 kB153.2 kB
ShortPixel
Optimized
103 kB44 kB

As you could see, PNG is the best format for images with text not only because it has a better picture quality, but it also produces files with smaller sizes. If your images don’t contain mostly text, then go with JPEG format.

If you are interested in image optimization tips and tools, give a try to ShortPixel image optimizer.

 

Image credits: Artur Rutkowski, and Patrick Tomasso

ShortPixel
ShortPixel
Articles: 42

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *