8.4 Optimizing Images for the Web

The three formats best suited to the Web are JPEG, PNG, and GIF. These file formats can be handled by all the major browsers, with some restrictions in the case of Internet Explorer. These formats use compression algorithms to decrease the size of the file, which increases the page’s download speed. Even though high-speed Internet access is common, users who still have a slow connection will appreciate any attempt to minimize the size of image files.

Here we summarize the most important aspects of these three formats, and in Chapter 20, we go into much more detail.


The JPEG format is the best suited for photos due to its 24-bit color depth, which lets it render a large number of colors. JPEG is also good for ...

Get The Book of GIMP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.