PNG vs JPEG vs GIF

The million dollar question is: “Which image format is the ultimate solution for web usage?”. And the answer is… well, it depends. There’s no ultimate and common image format to meet all the needs when using it on the Web. Because it depends on where and how it will be used and what you want from the image: the quality or file size.

This is a common confuse for designers [especially for the beginners]. So today I’ve decided to describe those 3 most popular formats and share my knowledge with you.

PNG [Portable Network Graphics]

Best used for: icons, buttons and other website elements
Supports: transparency, 256 colors
Animation: no
Compression: on-demand, depending on the amount of colors

JPEG/JPG [Joint Photographic Experts Group]

Best used for: photos, images with many details
Supports: 16 million colors
Animation: no
Compression: gets rid of details that a human eye doesn’t actually perceive

GIF [Graphics Interchange Format]

Best used for: animation, buttons, icons, tiny web elements
Supports: transparency, 256 colors
Animation: yes
Compression: on-demand, depending on the amount of colors

I guess the only difference between GIF and PNG is animation. I use GIF only for animation; PNG – my favorite for the site and JPEG – for screenshots, photos, big images. Below, you can see the differences in file size:


Even the screenshot above is in PNG. Because when I chose JPEG at maximum quality it made 243KB, so I chose PNG-24 – almost the same quality at lower filesize.

by Azamat "Bohed" E.

TrueKolor.net Owner. Professional Graphic Designer.

Web | More Posts (132)

You might also like

Learn How To Create An Animated PNG PNG rules the web! Oh, did I say that too loud? I don't think so. According to the growing popularity...
4 Quick Steps To Make an Image With Transparent Background Every web designer, big or small, deals with images transparent background sooner or later. Sometimes,...
Reincarnating Hi  everybody! Sorry for being out for so long.  But  from now on I'll be  always on and up-to -date....
Easy Steps to Create an Animated favicon in Photoshop A favicon is a small (16x16 pixels) icon/image that is shown in the address bar to the left of your address....

  • http://www.makeuseof.com/ Aibek

    nice post, after 8 years I seem to finally understand the difference between JPG and PNG

  • Anonymous

    PNG supports millions of colours (from Wikipedia: “palettes of 24-bit RGB or 32-bit RGBA colors”) so it is much more like JPEG than GIF. It supports transparency through an alpha channel. It was developed as open standard alternative to GIF (patented by Unisys) and JPEG (patented by the Fraunhofer institue).

  • http://twitter.com/figureten Figure.10

    PNGs can be animated. Check out animatedpng.net

  • Bohed

    Thanks for the info! But it’s Apng isn’t it? a bit different. The article is just a brief on the formats. I didnt even mention the difference between png-8 and png-24