Search FreeImageKit

Jump to any private image tool or workflow

FreeImageKit guide

How to compress images for the web

Good compression is a measured tradeoff between bytes, visual quality, decode support and the size at which an image is actually displayed.

Quick answer

To compress images for the web, resize them to the largest size they are actually displayed at, then lower the quality until detail and gradients still look acceptable, and consider WebP where your toolchain supports it. FreeImageKit resizes, compresses and converts in your browser, so your originals are never uploaded.

Steps

  1. Resize each image close to its largest real display size with Resize Image.
  2. Compress with Compress Image, inspecting detail and gradients, and keep the smallest result that still looks right.
  3. Open the result, confirm dimensions and transparency, and measure the real file size.

Resize before compressing

An image delivered at 3000 pixels but displayed at 900 pixels wastes bandwidth. Resize close to the largest real display size, while accounting for high-density screens when appropriate.

Choose quality by inspection

Nominal quality values are not equivalent across formats or encoders. Export representative settings, inspect detail and gradients, and keep the smallest result that remains acceptable for its purpose.

Validate the output

Open the result again, confirm dimensions and transparency, and measure real bytes. Keep source originals outside the delivery folder so you can regenerate later.

Frequently asked questions

How much can I compress an image?

It depends on the image. Resizing to the real display size often saves the most, and quality settings then trade detail for bytes. Inspect the result rather than trusting a number.

Should I convert to WebP?

WebP is often smaller than JPG or PNG at similar quality and has broad browser support. Keep a fallback if your CMS or tools do not accept it.

Does compressing change the dimensions?

Not unless you resize. Compression changes bytes, and resizing changes pixel dimensions.

Try the related local tools

Keep reading

Last updated

This guide describes format behaviour and product capability, not a guarantee for every source image or third-party workflow. Keep your original files and verify important exports.