Image basics · 6 min read

How image compression works

Compression changes how image information is stored. The right setting depends on the source image and the use you have for it.

A digital image stores information about pixels, color, and sometimes transparency. Compression makes the file smaller by representing that information more efficiently. Different formats use different methods, so two exports of the same image can have different sizes and visual results.

Lossless and lossy compression

Lossless compression reduces file size while preserving the decoded pixel values. PNG is a familiar lossless format. It is useful when exact edges, text, or transparency matter, although photographs saved this way may take more space.

Lossy compression removes some image information to reduce the file further. JPEG and lossy WebP are common examples. A quality setting controls how strongly the encoder compresses the image. A higher setting usually keeps more detail and makes a larger file; a lower setting usually makes a smaller file and increases the chance of visible artifacts. The exact result is encoder-dependent, so a number such as 80 is not a universal quality guarantee.

Why the savings vary

Images with broad, smooth areas often compress differently from images full of texture, fine detail, or noise. Dimensions also matter: a large image contains more pixels to encode. The format, encoder implementation, metadata, and chosen settings affect the final size. For these reasons, a tool cannot promise the same percentage reduction for every image.

Compression can even produce a larger file. This can happen when the source is already optimized, the chosen format is not well suited to the image, or the export settings preserve more information than the original.

Compare the result before saving

  1. Keep a copy of the original image.
  2. Choose an output format supported by the place where you will use the image.
  3. Try a moderate quality setting first and review the image at its expected display size.
  4. Look closely at faces, text, gradients, and high-contrast edges for unwanted changes.
  5. Compare the actual exported file size with the original.

Use the image compressor to create a JPEG or WebP copy and view the resulting size. The browser creates the file locally, and LeapArc reports when an export is larger instead of claiming that every setting reduces size.

When compression is not the right first step

If an image is much larger in pixel dimensions than its display area, resizing it may reduce the file size more effectively than lowering quality alone. If the image needs crisp lines or transparency, switching to a lossy format may create visible defects. Select the format and dimensions for the actual use, then compress only as much as the result can tolerate.