Optimising an Image File

With internet images, the goal is generally to have maximum image quality with minimum file size. Optimising an image refers to the process of balancing various compromises in order to achieve this goal. This page provides an overview of the optimisation process; the next three pages describe the details.


File Size

File size is determined by two main factors (there are others, but these are the important ones to understand):

  1. Image Size (Resolution)
    The "physical size" of the picture, ie. The size it appears on your screen at normal zoom. This is determined by the number of pixels in the image. The bigger the image, the more pixels it has and the larger the file size.
    To optimise the image size we will crop and/or resize the image.
  2. Image Quality (Compression)
    JPG and GIF are both "compressed" formats, which means you can lower the file size by reducing image quality. Don't worry - with a little practice you can reduce your file sizes significantly with little or no apparent effect on the image. Note that GIF and JPG files are handled differently when it comes to compression.
    To optimise jpg files we will compress them. To optimise GIF files we will reduce the number of colours.

In order to change either of these attributes you need to open the file in a graphics program, make the changes, then save the file. Exactly how you make the changes varies between programs but the examples which follow should give you the general idea.
Note: Not all programs have both options - in particular the ability to alter compression may be limited or absent in low-end programs.

Making Changes to Your Image Files

The best approach is to save the original version of the image and create copies which will be optimised. For example, when you scan a photo, save it as "myphoto-original.jpg". You can then perform various actions on this file and save copies such as "myphoto-optimised1.jpg", "myphoto-optimised2.jpg", etc. At no stage do you save over the original file - this ensures that you always have the original image to go back to if needed.

Finally, open all your copies and decide which is the best to use. You may actually want to use different versions for different purposes (eg send a low-quality version to your friends via email, but save a high-quality version for printing).

Before we move on, let's recap our purpose: To create a file with the best possible image quality with the lowest possible file size. We will follow two steps to achieve this:

  1. Crop and resize the image (done the same way for all images files)
  2. Compress the image (done differently for JPG and GIF files)

Next Step: How To Resize an Image

Subscribe to us on YouTube