Prev |  | Next

## 12. Preparing your Images for the web

One of the most common purposes GIMP is used for, is to prepare images for adding them to a web site. This means, images should look as nice as possible while keeping the file size as small as possible. This little step-by-step guide will tell you how to achieve a smaller file size with minimal degradation of image quality.

An optimal image for the web depends on the image type and the fileformat you've to use. If you want to put a photograph with a lot of colors online, you have to use JPEG as your primary fileformat. If it contains less colors, is not a photograph and more a drawing you created (like a button or a screenshot) you better stay with the PNG format. We'll guide you through the last described process.

1. First open the image as usual. I opened our Wilber as an example image.

   The Wilber image opened in the RGBA mode.

2. The image is now in RGB mode with an additional alpha channel (RGBA). There is mostly no need to have an alpha channel for your web image. You can remove the Alpha channel by flattening the Image.

   If you open a photograph, you probably don't have to remove an alpha channel, because it is already opened in RGB mode.

3. After flattening, you are able to save the image in PNG Format for your homepage.

| Note
You can save the PNG with the default settings, but with a maximal compression. Saving your image in PNG doesn't have any quality drawbacks in comparison to eg. JPEG. If you opened a photograph with lots of colors, you better save this file as a jpeg. The problem is, to get the best tradeoff between quality and compression. More information about this topic can be found in JPEG .

### 12.1. Squeezing Filesize a bit more

If you want to squeeze your image a bit more, you could convert your image to Indexed mode. Converting images with smooth color transitions or gradients to indexed mode will often give poor results, because it will turn the smooth gradients into a series of bands. This method is also not recommended for photographs. It'll make the image look bad and grainy.

The indexed image can look a bit grainy. The left image is the wilber in original size, the right one zoomed in by 300 percent.

1. Use the Convert Mode Dialog to convert your RGB image to indexed mode.

2. After converting to indexed, you are once again able to save your image in PNG Format.

Prev | Up | Next
| Home |