# Reach a smaller image size without guessing at the quality slider

> A file-size limit is a constraint, not a quality setting. The best result usually comes from adjusting three variables in order: pixel dimensions, output format and compression quality. Changing only quality can create visible artefacts while leaving an unnecessarily large canvas.

- Canonical page: [https://imagefromtext.com/guides/compress-image-to-target-size](https://imagefromtext.com/guides/compress-image-to-target-size)
- Related tool: [Open the image compressor](https://imagefromtext.com/tools/image-compressor)

## Start with the destination, not the original file

Record the maximum file size, the displayed dimensions and whether transparency is required. A 5000-pixel camera image does not need to stay 5000 pixels wide when it will appear as an 800-pixel website image or a small email attachment.

Keep the original file separately. Every lossy export discards information, so repeated compression of an already compressed copy compounds the damage.


## Use this order of operations

1. **Resize to the largest dimensions actually needed:** Removing unused pixels often produces the biggest saving with the least visible harm.
2. **Choose the format for the content:** JPG suits photographs, WebP is a strong web default, and PNG is appropriate for transparency or crisp flat graphics.
3. **Set a target or lower quality gradually:** Compare the result at its real display size. Stop when the file meets the limit and still looks acceptable.
4. **Inspect difficult areas:** Check faces, small text, gradients, shadows and sharp colour boundaries before accepting the export.

## Understand why some targets are unrealistic

- **Large dimensions still cost bytes:** A strict target may require fewer pixels even when the quality setting is already low.
- **Noise is expensive:** Grainy photographs and complex textures are harder to compress cleanly than simple backgrounds.
- **PNG behaves differently:** Lossless PNG does not have a photograph-style quality slider; reducing dimensions or colours may be necessary.
- **Transparency limits format choice:** JPG removes transparency, so a transparent asset may need PNG or WebP even when another format would be smaller.

## Example: prepare a photo for a 200 KB form limit

Return to the original, crop unused surroundings, resize to the form’s required pixel dimensions and export as JPG or WebP if transparency is unnecessary. Set 200 KB as the target, inspect facial detail and small text, and reduce dimensions slightly before accepting severe blockiness. The exact quality value will vary with every image.
