How to compress an image to a specific size

The right order of steps to hit a KB limit and keep the photo sharp.

By Jenna, Web designer, Ikonik Digital · Last updated 2026-09-18

A form says the photo must be under 50 KB. Your phone photo is 4 MB. Most people then try random quality settings until the file squeaks under, and end up with something that looks like it was taken through a steamed-up window. There is a better order of steps.

Why size limits are hard to hit by hand

An image's file size depends on three things: how many pixels it has, how much detail is in those pixels, and the compression quality. Quality alone has diminishing returns. Squeezing a 4000-pixel-wide photo into 50 KB by quality alone produces heavy blocky artefacts, because there are simply too many pixels for the budget. Reducing the pixels first leaves more bytes per pixel, and the result looks far better.

The four steps

  1. Crop to what matters. A passport photo needs your head and shoulders, not the wall behind you. A signature needs the ink, not the page. Cropping removes pixels that would otherwise eat the budget. Use the crop tool.
  2. Resize to the dimensions the form wants. If the form lists pixel dimensions, match them exactly with the resize tool. If it does not, a face photo rarely needs more than 600 pixels across, and a document page 1200 to 1600.
  3. Compress to the target. The compress to KB tool takes the limit and searches for the highest quality that fits, shrinking dimensions further only if it has to.
  4. Check the result. Open the file and look at it at full size. Faces and text should be clean, with no blocky patches in skin or background.

How much fits in common limits

LimitWhat fits comfortably at good quality
20 KBA signature about 400 pixels wide, or a small face photo about 250 pixels wide
50 KBA head-and-shoulders photo up to about 600 pixels wide
100 KBA general photo about 1000 to 1400 pixels wide, or one document page
200 KBA large, sharp photo about 1600 to 2000 pixels wide
500 KBA high-resolution photo, or a multi-page document as a compressed PDF

KB or KiB?

Some systems count 1 KB as 1000 bytes, others as 1024. A file of 51,000 bytes is under a 50 KiB limit but over a strict 50 KB one. When a form says 50 KB, aim under 50,000 bytes and you pass either way. The compress to KB tool does this automatically.

What makes photos expensive to compress

  • Noise. Photos taken in dim light are full of grain, and grain is the most costly detail to store. Take photos in good light.
  • Busy backgrounds. Leaves, patterned wallpaper and cluttered rooms use bytes the subject needs. Use a plain wall.
  • Uneven lighting on documents. Shadows and grey paper cost more than clean white. Photograph documents flat, in daylight.

JPG, PNG or WebP?

For photos and scans under a size limit, JPG. PNG is lossless and will almost never reach a small limit with a photo. WebP is more efficient than JPG, but most forms reject it, so only use it where the site says it is accepted.