20 KB is where most compressors fall apart. Slider-based tools land at 15 KB or 28 KB and offer no way to nudge them onto the exact target. Someone opens the compressor, tries "medium", gets 34 KB, tries "low", gets 12 KB, and the portal accepts neither. This isn't the compressor's fault exactly — it's the wrong interface for the problem.
The BPIE engine underneath Bluebird treats this as a solver problem: given a target byte count and an input image, find the JPEG quality that lands closest to (but under) the target, and warn you loudly if that quality would make the image unreadable. It converges in about four passes and it's designed for exactly this class of request. This post walks through how to use it well, and what tricks matter when the target is this tight.
Crop before you compress — this is the whole game
The biggest lever for a tight cap like 20 KB is the pixel count, not the JPEG quality. A 3000 × 4000 pixel photo compressed to 20 KB looks awful because JPEG has to describe 12 million pixels using roughly 160,000 bits — about 0.013 bits per pixel. That's not enough.
The same portrait cropped to 300 × 400 pixels compressed to 20 KB has 160,000 bits to describe 120,000 pixels — 1.3 bits per pixel, one hundred times the budget. At that budget, a face looks sharp and a signature reads cleanly.
So the first step is always the same: open Bluebird's Image Cropper, pick the right preset (3.5:4.5 for a passport photo, tight rectangle for a signature), drag to fit, and export. Then compress. Do these in reverse order and no compressor can save the result.

Hit the exact 20 KB target
Open /compress-image-to-20kb. Drop the cropped image. Wait a beat while BPIE runs its search. Download.
The output lands between 17 KB and 20 KB every time, comfortably inside the cap. Under the hood, the engine encodes the image at JPEG quality 50, measures the result, and adjusts. If it's over, halve down to 25. If it's under 80% of target, halve up to 75. Repeat until it's inside a comfortable band or seven iterations are up. On a 300 × 400 photo, the whole search takes about 400ms.
If your source is a scanned signature on white paper, consider running it through Bluebird's Background Remover first to turn the off-white background into pure white — this shaves another 10-15% off the file size at the same visible quality because JPEG spends fewer bits describing the near-uniform region.

The five tricks that actually help under 20 KB
One: prefer JPEG over PNG. PNG's lossless compression rarely fits under 20 KB for anything larger than a tiny icon. Every portal that caps at 20 KB expects JPEG anyway. Bluebird writes a real JPEG regardless of what your source was.
Two: prefer greyscale for signatures. A signature is black ink on white paper; greyscale JPEG compresses roughly 30% smaller than colour JPEG with no visible loss for this content. Bluebird auto-detects this and offers a greyscale toggle.
Three: aim for around 300 × 400 pixels for a passport photo, and about 500 × 200 pixels for a signature. Anything larger is wasted pixels the portal will downscale. Anything smaller is throwing away sharpness for no benefit.
Four: take the source photo in even, diffuse light. Uneven shadows and JPEG noise from a low-light phone camera create high-frequency detail that JPEG spends bytes trying to preserve. A well-lit source photo compresses to a smaller, cleaner output at the same quality setting.
Five: skip chroma subsampling for coloured signatures. If your signature is in blue or red ink, disabling 4:2:0 chroma subsampling (Bluebird has an advanced toggle for this) preserves the colour better at the cost of about 15% larger file. Worth it when the portal specifically wants the ink colour visible.

When 20 KB is genuinely impossible
Some inputs cannot fit in 20 KB no matter what. A screenshot with lots of text is one — JPEG handles hard edges badly at any quality, and the SSIM floor Bluebird enforces will refuse to go below a legibility threshold. In that case, the tool warns you clearly ("couldn't hit 20 KB while keeping the image legible") and delivers the smallest file it could produce without smearing.
The right response depends on the portal. If the portal will accept a slightly-larger JPEG, use it. If the cap is hard, reduce the pixel dimensions further before recompressing. If the content is a screenshot, use a lossless PNG optimiser instead — JPEG is genuinely the wrong tool.
The one anti-pattern we see a lot: users retry the compressor five times in a row hoping for a different result. BPIE is deterministic — same input, same output. The way to get a different output is to change the input (usually the pixel dimensions).
The whole workflow, top to bottom
Take a clear source photo (even light, plain background). Crop to the portrait or signature frame. Compress to your specific target using the dedicated size-target page. Verify the file opens correctly in your browser's built-in viewer. Upload to the portal.
One tab, one minute, zero uploads to strangers. For the specific PAN card flow, the portal also caps signatures at 10 KB — Bluebird's compressor has a /compress-image-to-10kb page for exactly that. For Aadhaar, /compress-image-to-100kb is the one. For SSC, /compress-image-to-50kb for the photo and /compress-image-to-20kb for the signature.
If you want to understand why the binary-search-plus-SSIM approach works better than the alternatives, the BPIE deep dive walks through the whole algorithm with diagrams. It's the honest technical version of what makes this class of tools different from a slider.


