Skip to content

What Is Image Compression?

Every raw image is a grid of pixel values, and grids are wasteful. Image compression rewrites that grid into a smaller representation, either by finding mathematical shortcuts that lose nothing, or by discarding details the eye is unlikely to notice. The result is a file that downloads faster, costs less to store, and still looks like the original.

Definition

Image compression is any encoding scheme that reduces the byte count of an image. Lossless compression rebuilds the exact original pixels; lossy compression trades pixel-perfect accuracy for far smaller files.

Why it matters

A 6 MB photo and a 300 KB photo can look identical on a phone screen. The larger file punishes your page speed, your users' data plans, and your storage bill for no visible gain. Compression is the tax you avoid paying for information nobody sees.

Advantages

  • Faster page loads and better Core Web Vitals
  • Lower storage and CDN costs at scale
  • Better user experience on mobile and slow networks
  • Enables sending images over email, chat, and forms without hitting size limits

Disadvantages

  • Aggressive lossy compression introduces blocking, banding, or blur
  • Repeated re-saves of lossy files compound artifacts
  • Lossless gains are modest on already-complex photos
  • Some compression choices strip metadata like color profiles or EXIF

Examples

  • A 4 MB DSLR JPG re-encoded at quality 80 becomes 700 KB with no visible change
  • A PNG screenshot passed through lossless optimisers dropping 20–40%
  • A WebP export of a hero image at half the JPG size
  • A batch of product photos compressed for a shop's listing pages

Common misconceptions

  • Compression is not the same as resizing, you can compress without changing dimensions
  • PNG is not automatically 'high quality'; it is lossless, which is different
  • Higher-quality JPG is not always better, beyond ~85 the gains are invisible
  • Compressing an already-compressed file rarely helps and often hurts

Frequently asked questions