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 |
---|---|---|---|
|
Lossy: Sacrifices image quality ... |
Get ASP.NET Site Performance Secrets 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.