Every developer who has built a KYC form, government portal upload, job application attachment box, or lightweight CMS eventually hits the same constraint:
"Image must be under 100 KB (100,000 bytes)."
Most blog posts wave at this with generic advice ("use JPEG for photos, PNG for screenshots, or just switch to WebP"). In practice, when the file size cap is hard (100,000 decimal bytes, not 102,400) and dimensions stay fixed at 1200 × 800, the trade-offs between JPEG, WebP, and PNG behave very differently depending on whether the image is a continuous-tone photo or a crisp UI screenshot with 12px text and an embedded card image.
To make this concrete—and give tutorial authors two copyright-free fixtures they can redistribute without licensing headaches—we created two CC0 1.0 Public Domain 1200 × 800 test images and ran both through the same strict 100,000-byte ceiling:
- Photo fixture (
photo-1200x800.jpg,461,202bytes): sunset sky gradient, layered horizon ridges, water ripples, natural grain, and thin high-contrast mast rigging lines (to expose JPEG ringing).- Direct CC0 download: https://toolars.com/samples/image-compressor/photo-1200x800.jpg
- UI & text screenshot fixture (
ui-screenshot-1200x800.png,374,057bytes): dashboard layout with crisp 12px table text, 1px hairline borders, colored status labels, and an embedded photographic preview card (the exact kind of real-world screenshot developers upload to docs and support portals).- Direct CC0 download: https://toolars.com/samples/image-compressor/ui-screenshot-1200x800.png
- CC0 license file: https://toolars.com/samples/image-compressor/LICENSE.txt
Reference Measurements at a Strict 100,000-Byte Cap (1200 × 800, No Resizing)
Measured deterministically with Pillow (libjpeg / libwebp / PNG optimize=True, quality stepped from 95 down to 50 while keeping original 1200 × 800 dimensions):
CC0 Fixture (1200 × 800) | Original Size | Format | Size at q=85 | Max Quality ≤ 100,000 B | Resulting Size | Savings / Verdict |
|---|---|---|---|---|---|---|
Photo (photo-1200x800.jpg) | 461,202 B | JPEG | 206,913 B | q=65 | 98,391 B | -78.7% · Reached (watch sky banding) |
Photo (photo-1200x800.jpg) | 461,202 B | WebP | 211,826 B | q=67 | 99,648 B | -78.4% · Reached |
Photo (photo-1200x800.jpg) | 461,202 B | PNG | — | Unreachable | 1,409,638 B | +1,309,638 B over budget |
UI Screenshot (ui-screenshot-1200x800.png) | 374,057 B | PNG | — | Unreachable | 374,057 B | +274,057 B over budget |
UI Screenshot (ui-screenshot-1200x800.png) | 374,057 B | JPEG | 120,509 B | q=76 | 97,368 B | -74.0% · Reached (chroma ringing on red/blue 12px text) |
UI Screenshot (ui-screenshot-1200x800.png) | 374,057 B | WebP | 60,648 B | q=94 | 98,918 B | -73.6% · Reached with near-lossless 12px text |
(Note: browser canvas.toBlob encoders on Chromium, Firefox, and Safari use platform-specific JPEG/WebP implementations, so exact byte counts and final quality steps will vary slightly per browser—which is why testing directly in the target browser matters.)
Three Non-Obvious Takeaways for Forms & Docs
- The "use PNG for screenshots" rule breaks immediately under a 100 KB cap when a screenshot contains even one thumbnail photo. At
1200 × 800, lossless PNG (374,057 B) is 3.7× over budget with no quality slider to pull down. If your form or CMS refuses to resize, lossless PNG simply cannot hit100,000bytes. - WebP's biggest win isn't actually the photo—it's the mixed UI + text screenshot. On the noisy
1200 × 800photo, JPEG (q=65) and WebP (q=67) land at nearly identical quality levels under100,000bytes. On the UI screenshot, however, WebP atq=85already drops to60,648bytes, meaning a 100 KB budget lets WebP stay all the way up atq=94(98,918 B)—keeping 12px text and 1px table rules razor-sharp while JPEG drops toq=76and introduces chroma ringing around colored labels. - When an upload form refuses WebP AND rejects >100 KB PNGs, you only have two honest exits:
- Accept JPEG (
q≈75) and inspect 1:1 crop legibility around small text/digits before submitting; or - Reduce pixel dimensions first (for example, scaling
1200 × 800down to900 × 600or800 × 533) before re-encoding.
- Accept JPEG (
Reproduce This in Your Own Browser (Settings-Only URL Recipes, Zero Uploads)
We wired settings-only URL recipes into Toolars Image Compressor (only scalar settings travel in the query string—never image bytes or filenames—and everything encodes locally in your browser tab):
- 100 KB JPEG photo exercise: https://toolars.com/tools/image-compressor?target=100&format=jpeg
- 100 KB WebP UI screenshot exercise: https://toolars.com/tools/image-compressor?target=100&format=webp
- 100 KB PNG unreachable counterexample: https://toolars.com/tools/image-compressor?target=100&format=png
Open any link above, click Load photo sample (100 KB JPEG) or Load UI screenshot (100 KB PNG counterexample) inside the 100 KB reproducible practice lab, run the compression, and switch between Source / Result at 1:1 detail zoom to inspect the 12px table text and sky gradients yourself.
If you teach frontend performance, maintain a form-upload guide, or write CMS docs, feel free to mirror or link directly to the CC0 originals (photo-1200x800.jpg and ui-screenshot-1200x800.png) and recipe links—no attribution required.