The goal of every web designer is to have images that look good, while having the smallest file size possible. There are three popular graphic compression formats available for web designers to use. These are GIF, JPG, and PNG.
The question that every new web designer faces is, what graphic format should they use for their website. The quick and dirty answer is, use JPG for photographs, and use GIF for buttons, and other web page graphics.
Graphics Interchange Format, uses the compression algorithm owned by Unisys. The GIF format is a lossless compression technique that only displays 256 colors. GIF works well for images with only a few distinct colors, such as line drawings, buttons or small text. GIF images can be animated. (See my thoughts on animated gifs - Luke's Web Design Peeves) GIF also supports transparency, so the color on the underlying Web page can show through.
Joint Photographic Experts Group, the committee that wrote the JPEG standard. JPG is a lossy compression technique, it discards information that the human eye cannot detect. JPG images support 16 million colors, and best suited for photographs.
Portable Network Graphics, the newest Web graphics standard (not supported by all browsers). PNG was developed as a patent-free alternative to the GIF format, and as an improvement on the GIF. An image in a lossless PNG file can be 5%-25% more compressed than a GIF file of the same image. PNG opacity that allows the control of the degree of transparency. PNG does not support animation.
![]()
GIF - 1.93 kb |
![]()
JPG - 5.12 kb |
![]()
JPG - 2.02 kb |
![]()
JPG - 4.14 kb |
![]()
GIF - 25.6 kb |
![]()
GIF - 4.43 kb |