O'Reilly logo

ASP.NET Site Performance Secrets by Matt Perdeck

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Image size

Reducing the size of your image files will reduce your bandwidth costs and reduce load times. Unlike caching and parallel loading, this approach is not dependent on the vagaries of browsers and proxies. Later on, we'll see various tools with which you can reduce image file sizes. But first, let's have a look at choosing the optimal image format based on the content of the image.

Using the optimal image format

Most browsers recognize at least the three main image formats: JPEG, GIF and PNG. Each image format stores the image in a compressed form, using its own compression algorithm, and supports different features such as animation:

Format

Compression

Supports Transparency

Supports Animation

JPEG

Lossy: Sacrifices image quality ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required