Two different fixes for one complaint
“My image is too big” can mean two different things, and they have different fixes. Resizing changes the pixel dimensions — how many pixels wide and tall the image is. Compression reduces the file weight in kilobytes while keeping the same dimensions.
Knowing which problem you actually have saves a lot of wasted quality. Most slow pages suffer from images that are both far larger in dimensions than needed and barely compressed.
When to resize
Resize when the image has more pixels than the space it is shown in. A 4000-pixel-wide camera photo displayed in a 1200-pixel column is wasting roughly three quarters of its data; the browser downscales it on every visit and the visitor downloads all of it anyway.
Set a sensible maximum width and height for where the image will appear, and scale down to that. Avoid scaling up — enlarging a small image cannot invent detail and just looks soft.
- The image is wider or taller than its display area
- You are preparing thumbnails or banners
- Downscale only; never upscale to add detail
When to compress
Compress when the dimensions are already right but the file is still heavy. Lowering JPEG or WebP quality removes data the eye barely registers, often cutting the size by half or more with no obvious change.
Watch the preview as you lower quality: too much compression brings blockiness, banding in skies, and halos around edges. Stop at the point where the file is small but the image still looks clean.
- Dimensions are correct but the file is large
- You need to meet an upload size limit
- Compare quality against size before saving
The best order: resize first, then compress
For the smallest clean result, resize to the dimensions you actually need first, then compress that smaller image. Doing it in this order means compression works on far fewer pixels, so you reach a small file without pushing quality as low.
Keep your original full-size file. If you later need the image larger or for print, you can re-export from the original rather than upscaling a version you already shrank.