How to compress an image to a target KB: practical methods for three scenarios

Application systems cap files at 100KB, WeChat covers at 2MB, ID photos at 50KB… How do you hit different size limits in one pass? This guide gives a general approach and parameter tips for compressing to a target size.

Compression Tips Author tdd8.cn

"Upload failed: the image must be under 100 KB" -- anyone who has filled in an application or uploaded an ID photo has seen this. The key is not to drag quality down blindly but to fix the target size first, then find the highest quality that still fits. Doing that by hand takes a dozen attempts, which is exactly why "compress to a target KB" exists.

1. Three numbers people confuse

  • File size (KB/MB): decides whether the upload passes; this is what portals, mail attachments and publishing backends actually check.
  • Pixel dimensions (px): the ceiling on sharpness; 295x413 for a 1-inch ID photo, 800x800 for a marketplace main image.
  • Resolution (DPI): only affects printing. On screen, 72 DPI and 300 DPI look identical.

Most failed compressions changed the dimensions but not the file size, or dropped quality until the image turned to mush. The right order is: crop or resize to the target pixels, then compress to the target KB.

2. How to compress to a target size

Taking 100 KB as the example, there are three steps:

  • Drop the image into compress to a target KB, type 100 and choose KB;
  • The tool searches downward from high quality, using bisection to find the highest quality that stays under 100 KB -- usually 3-8 encodes;
  • Download the result; the file extension is unchanged and the quality loss is barely visible.

If even the lowest quality cannot reach the target, the pixel dimensions are too large: shrink first. A 4000x3000 phone original will never hit 20 KB; resizing to 1200 px wide and then compressing works far better.

3. Reference sizes by scenario

  • Application or qualification photos: 50-200 KB, usually also 295x413 or 358x441 px.
  • Official account cover: under 2 MB, 900x383 recommended, and under 300 KB loads fastest.
  • Marketplace main image: Taobao requires 800x800 or larger and under 3 MB, but 200 KB opens detail pages instantly.
  • Email attachments: keep the whole message under 5 MB, images around 500 KB each.

4. Why compressed images look mushy

JPEG is lossy: it discards high-frequency detail. Letter edges and fine textures (hair, fabric) break down first, while landscapes and faces tolerate compression well. If an image is full of text, keep PNG or switch to WebP -- letter edges stay much cleaner at the same size.

Repeated compression also accumulates damage. Always recompress from the original, never from an already compressed copy.

FAQ

Does compressing to a target KB lose quality?

There is slight loss, but the tool picks the highest quality that just meets the limit, so daily use shows no visible difference; for text-heavy images WebP is better.

Why can't I hit the target size?

Usually the pixel dimensions are too large. Shrink the long edge to under 1600px first, then compress—success rate jumps.

Does it work on mobile?

Yes—on a phone browser you can pick, compress and download images; files are not uploaded to a server.

Tools used in this guide