← Back to home
Home › Image Guides › Compress to a target size

Compress an Image to an Exact File Size: Beating Upload Limits

An application form demands a photo under 200 KB; an attachment is capped at 500 KB. This guide explains why lowering quality so often fails, why capping the width works better, and gives you a repeatable procedure for working backwards from a target size.

First: the limit is file size, not dimensions

People often assume they must "make the image smaller", but what systems actually limit is file size in bytes (KB), not pixel dimensions. The two are related but not the same:

  • Pixel dimensions — a resolution such as 1920×1080.
  • File size — how many KB it takes to store those pixels.

At the same 1920×1080, a flat-colour icon might be 50 KB while a detailed landscape is 800 KB. The busier the image, the larger the file at the same dimensions.

Why lowering quality often fails

The JPG quality parameter controls how coarse the quantisation table is, but it only works if the original still contains redundancy to discard.

If your image has already been compressed once — sent through WeChat, downloaded as a web thumbnail, compressed by someone else — there is almost nothing left to remove. Worse, re-encoding sometimes makes the file slightly larger.

Quick test: drop quality from 90 to 60. If the size barely moves, the image is already wrung out and you need a different approach.

What actually works: capping the width

This is the most effective and most overlooked trick. The logic is simple: fewer pixels means less information to store.

  • 4000 px wide → 1600 px leaves about 16% of the pixels, and the file usually shrinks dramatically.
  • 4000 px wide → 800 px leaves about 4%.

The key insight: most systems do not need high resolution. An application photo might require 295×413 while your phone produces 4000×3000 — a dozen times more pixels than necessary.

Working backwards from a target size: three steps

  1. Fix the dimensions first. Find out what pixel size the target system asks for, then scale to just meet it, slightly over at most.
  2. Then fine-tune quality. Start at 80. If still too big, drop 10 at a time; if still over, go back to step 1 and reduce dimensions one more notch.
  3. Finally, zoom in and check. Look at text edges, face outlines and flat gradients for blocking or banding.

The order matters — dimensions before quality is far quicker and preserves better quality than the reverse.

Common limits and what to do

ScenarioRecommended settingsNotes
Application / exam photo, 20–100 KBScale to the required size (e.g. 295×413), quality 70–80Correct dimensions usually pass first time
Government / recruitment, 200 KBLong edge 1000–1500 px, quality 75Capping width beats lowering quality
Email attachment, 500 KB–1 MBLong edge 2000 px, quality 80Leave headroom for several images
Web image under 100 KBLong edge 1200 px, WebP, quality 80Changing format beats brute-force compression
WeChat / social platformsLong edge 1280–1920 pxThe platform recompresses anyway

Pitfalls to avoid

  • Re-saving the same JPG repeatedly. Each save discards more. Always export once from the original.
  • Crushing quality to hit a target. Below 50, blocking becomes obvious, especially around text and faces. Reduce dimensions instead.
  • Forgetting transparency. JPG output drops the alpha channel and fills it white or black. Use PNG and shrink dimensions instead.
  • Ignoring the format. WebP is typically 25%–35% smaller than JPG for the same content — if the target accepts it, that is the easiest win.

FAQ about compressing to a target size

Why did the file get bigger after compressing?
When the original is already heavily compressed, re-encoding removes nothing and metadata or encoding overhead can add a little. Cap the width instead of pushing quality lower.
What quality should I use?
70–80 for web images. When hitting a strict KB target, start at 75 and step down. Below 50 the damage is obvious — reduce dimensions instead.
Is there a one-shot setting?
No universal value exists, because image complexity varies. Reliably: lock the dimensions your target requires, then fine-tune quality. Two or three passes will land it.
Does compression keep transparency?
JPG output has no alpha channel, so transparent areas are filled white or black. Use PNG and reduce size with the Resize tool instead.
Can lost quality be recovered?
No. What lossy compression discards is gone. Keep the original and re-export from it every time.