How to compress images for a website

Make web pages load faster: resize to the displayed size, pick JPG, PNG or WebP, and compress without visible quality loss. Includes size targets.

Why image size matters

Images are usually the heaviest part of a web page. A single unoptimized phone photo can be 4–8 MB — more than the rest of the page combined. Large images slow down loading on mobile data, hurt Core Web Vitals (especially Largest Contentful Paint) and can cost you search ranking and visitors.

Step 1 — Resize to the size you actually display

Compression can only do so much if the image is far bigger than its slot. A hero image rarely needs to be wider than 1920 px, a blog image 1200 px, and a thumbnail 400 px. Use the Image Resizer with the aspect-ratio lock on, enter the target width, and the height is calculated for you.

  • Full-width hero: 1920 px wide
  • Article / content image: 1200 px wide
  • Card or thumbnail: 400–600 px wide

Step 2 — Pick the right format

  • JPG: photos. Small files, no transparency.
  • PNG: logos, screenshots and anything with transparency or sharp text.
  • WebP: both photos and graphics, usually 25–35% smaller than JPG at similar quality, supported by all modern browsers.

The File Converter turns JPG or PNG into WebP (and back) if you want the smaller format.

Step 3 — Compress

  1. Open the Image Compressor.
  2. Drop your JPG, PNG or WebP files.
  3. Leave the quality on Auto — it targets a level most people can't tell from the original.
  4. Download and compare: a 70–90% size reduction is common for photos.

If you need the file even smaller, lower the quality slider a little at a time and check flat-color areas (skies, walls) for blocky artifacts.

Quick checklist

  • Aim for under 200 KB for content images and under 500 KB for heroes.
  • Add descriptive alt text — it helps accessibility and image search.
  • Set width and height attributes so the layout doesn't jump while loading.
  • Use loading="lazy" for images below the fold.