Articles in The 'Optimizing-Images-Optimizing' Tag


December 9 2009

The Basics of Optimizing Images for the Web

by Shawn Escott

When it comes to the optimization of images for the web, it is important to know when, why and how to compress them. This short tutorial will help you get the most out of your images and will keep your file sizes smaller for faster page loads.

The main image compression formats:

Jpeg —use when compressing an image such as a photograph or illustration.

Gif — use when compressing images with flat color, such as a logo, chart or other graphic. A transparent background can be used with gifs, however, there will be a ragged edge of pixels around your image.

Png — use if a transparent background is required. Most browsers accept transparent pngs with the exception of Internet Explorer 6.

Compressing Photographic Images  

photo-original

Original Image.

photo-jpeg70percent

Jpeg at 70% quality.
File size: 13K
Very close to the high quality of the original and file size is acceptable.
Best option

photo-jpeglowquality

Jpeg at 5% quality.
File size: 3K
Quality is unacceptable.

photo-gif256colors

Gif with 256 color max.
File size: 26K
Good quality with some pixilation but higher file size.

photo-png

Png.
File size: 93K
Great quality but file size too large.  

 

Compressing Flat Color Graphic Elements  

free-gift-original

Original image

free-gift-original

Gif with 16 colors.
16 colors were used instead of 2 because the pixels around the text are transitional colors to give the appearance of soft edges.
File size: 3K
Best option.

free-gift-50jpeg

Jpeg at 50% quality.
File size: 6K
Poor quality, not acceptable.

free-gift-png

Png.
File size: 5k
Good quality but larger file size.

You can clearly see from the above examples that optimizing your images correctly can make a huge difference in look and load-time. Stick with these examples as a guide to compressing your images and you’ll be up and loading in no time.

 

© 2023 MoreVisibility. All rights reserved.