How the compressor chooses a result.
The goal is precise and limited: find the strongest standard JPEG completed within 60 seconds that remains below 99% of the maximum size you entered.
1. Verify the input
The browser reads the file signature instead of trusting only its extension. The launch limit is 50,000,000 bytes and 50 megapixels. JPG, PNG, HEIC, and HEIF are accepted.
2. Decode locally
JPEG and PNG use browser decoding with orientation and colour conversion. HEIC/HEIF uses a local libheif-based decoder when native decoding is unavailable. Transparent pixels are placed on white because the standard output is JPEG. Re-encoding removes source metadata, including GPS and device details.
3. Search candidates
A Web Worker tests resolution levels and performs a bounded quality search. MozJPEG WebAssembly is preferred; browser JPEG encoding is a fallback. The search keeps the best valid candidate found so far.
4. Respect the deadline
A hard 60-second wall-clock limit prevents endless processing. If a valid candidate is ready at the deadline, it can be offered with a timeout notice. If none exists, the tool returns an actionable failure instead of an oversized file.
5. Explain risk
The current deterministic score combines retained resolution and encoder quality. Low, medium, and high risk labels are warnings, not objective guarantees. Important text, faces, QR codes, signatures, and seals should always be inspected manually.
What this is not
This is not generative reconstruction, lossless compression, official portal validation, or proof that a result is globally optimal. The output is ordinary JPEG for compatibility.