Image compression is the process of reducing the file size of images so web pages load faster, ideally without a visible drop in quality.
There are two kinds:
- Lossy compression removes some image data permanently. It achieves much smaller files and is fine for most photos at sensible quality settings.
- Lossless compression reduces size without losing any data, but saves less. It suits graphics, logos and images with text.
Large images are one of the most common causes of slow pages and poor Largest Contentful Paint scores, especially on mobile.
Good practice:
- Resize images to the largest size they are actually displayed at, not the original camera resolution.
- Use modern formats such as WebP or AVIF, which are much smaller than JPEG and PNG at similar quality.
- Serve responsive images with srcset so phones get smaller files.
- Compress before upload or use a plugin or CDN that compresses automatically.
- Use Lazy Loading for images below the fold.
Aim for most content images to be well under 200 KB, and hero images as light as quality allows. Compression is part of our image SEO checklist and technical SEO work.
