How to Compress Images for the Web: Complete Guide

Large images are one of the biggest causes of slow websites. Optimizing your images can reduce page load times by 50% or more, improving both user experience and SEO rankings.

Why Image Compression Matters

Images typically account for 50-75% of a webpage's total size. Compressing them reduces bandwidth usage, speeds up page loads, and directly improves Google's Core Web Vitals metrics like LCP (Largest Contentful Paint).

Step 1: Choose the Right Format

Before compressing, make sure you're using the right format:

  • WebP — Best for web delivery. 25-35% smaller than JPG/PNG.
  • JPG — Good for photographs when WebP isn't an option.
  • PNG — Only when you need transparency or pixel-perfect graphics.

Step 2: Set the Right Quality Level

Quality 80-85% is the sweet spot for most images. Below that, compression artifacts become noticeable. Above that, file size increases with minimal visual improvement.

  • 80-85% — Ideal for most web images
  • 60-75% — Acceptable for thumbnails and background images
  • 90-100% — Only for hero images or portfolio showcases

Step 3: Resize Before Compressing

Don't serve a 4000px wide image in a 800px container. Resize images to their display dimensions first, then compress. This alone can reduce file size by 80%+.

Step 4: Compress in Batch

If you have multiple images, batch processing saves time. Tools like ImgPressr let you drag and drop multiple files, compress them all at once, and download as a ZIP file.

Recommended File Sizes

Image TypeTarget Size
Hero/Banner imageUnder 200 KB
Content imageUnder 100 KB
ThumbnailUnder 30 KB
Icon/LogoUnder 10 KB

Quick Compression Workflow

  1. Resize images to display dimensions
  2. Convert to WebP (or JPG for compatibility)
  3. Set quality to 80%
  4. Compress and compare before/after
  5. Download and deploy