Image compression explained: lossy vs lossless, and how to get a photo under any KB limit
What actually happens when an image is compressed, why a 4 MB photo can become 50 KB and still look fine on a form, the difference between lossy and lossless, and the order of operations that hits a KB target without visible damage.
· 3 min read · 1.4K views · by the Cortex Digital Hub team
Type the KB you need; the tool finds the gentlest setting that fits. Runs in your browser, batch of 50, nothing uploaded. Free.
Compress to a target size → Opens Image Compressor · runs in your browser
Every form that says "photo under 50 KB" sends people to a compressor, and every compressor has a slider nobody understands. This is what the slider does, what else is in play, and the sequence that gets any image under any limit without wrecking it.
What takes up the space
An image's size on disk comes from two things multiplied together: how many pixels it has and how many bytes each pixel costs after compression. A 12-megapixel phone photo has 12 million pixels; at JPG's typical 0.25 bytes per pixel that is about 3 MB. Shrink it to 1,200 × 900 (about 1 megapixel) and it is about 270 KB at the same quality. The pixel count did ten times more than any slider could.
Lossy vs lossless
Lossless compression (PNG, GIF, optimised PNG, "lossless WebP") finds repetition and stores it more cleverly. Nothing is thrown away; you get the exact pixels back. It works brilliantly on flat colours and sharp edges (logos, screenshots, diagrams) and barely at all on photographs, which have no repetition.
Lossy compression (JPG, WebP, AVIF, HEIC) throws away what the eye is bad at seeing: fine texture in busy areas, subtle colour differences, high-frequency noise. The quality setting decides how much. At 80–85% the result is indistinguishable from the original on a screen and the file is a tenth of the size of a lossless one. At 50% you start to see blocks in skies and rings around edges.
The practical rule: photos → lossy; graphics and anything with text → lossless.
The quality slider, in numbers
For a typical photo saved as JPG:
| Quality | Size relative to 100% | What you see |
|---|---|---|
| 100 | 100% | Nothing different from 92 |
| 92 | ~55% | Nothing different from 85 |
| 85 | ~40% | Indistinguishable on screen |
| 75 | ~30% | Very slight softness in fine texture |
| 60 | ~20% | Visible blocks in smooth gradients |
| 40 | ~12% | Obviously compressed |
Most of the saving happens between 100 and 85, where nothing visible changes. There is no reason to save above 85–90 for anything but print.
The order that hits a KB target
- Crop to the subject. Pixels outside the frame cost the same as pixels inside.
- Resize to the pixels the use actually needs: 1,000–1,600 px on the long side for the web, e-mail and WhatsApp; 413 × 531 for a passport photo; 1,000+ px for marketplaces. This is the big win.
- Choose the format: JPG for photos going to people and portals, WebP for your own website, PNG for graphics.
- Set quality at 80–85 and check the size.
- If it is still over, let the tool search: the Cortex image compressor has a "To a file size" mode that tries quality steps and, if needed, a modest resize, until the file fits the KB you typed. For the common limits there are direct pages: 20 KB, 50 KB, 100 KB, 200 KB, 500 KB.
Things that make files bigger than they look
- EXIF data and embedded colour profiles can add 50–500 KB to a small photo. Compressors strip them; this alone sometimes meets a limit.
- PNG screenshots of photos. A screenshot is PNG by default; a screenshot of a photo is a photo in the wrong format. Convert to JPG.
- Noise. A dark, grainy phone photo compresses badly because grain looks like detail. Brightening and a touch of noise reduction before compressing can halve the size.
- Re-saving JPGs. Each save at 85% re-compresses; after five rounds the artefacts stack. Edit from the original.
Privacy, briefly
A compressor that uploads your passport photo to a server to shrink it is a strange trade. The Cortex tools run in the browser: the file never leaves your device, which is also why a batch of 50 photos finishes in seconds instead of waiting for uploads.
Frequently asked questions
Does compressing an image reduce its quality?
Lossy compression (JPG, WebP, AVIF) removes detail the eye rarely notices; at 80% quality the difference from the original is invisible on a screen. Lossless compression (PNG, and PNG optimisers) removes nothing. Heavy lossy compression, below about 60%, does show.
Why is my photo still 2 MB after compressing?
Because compression quality alone cannot save a 4000-px photo past a point. Size is pixels times quality. Resize to the pixels you actually need (1000–1600 px for most uses) and the KB drops by far more than any quality slider.
What is the smallest a passport photo can be?
A 413 × 531 px JPG at 70–80% quality is 20–45 KB; at 60% around 15 KB. Indian forms that ask for 10–20 KB are asking for roughly that resolution at a quality that still looks clean.
Is it better to compress a PNG or convert it to JPG?
For a photo, convert to JPG: lossless PNG compression can only shave a little off a photo. For a logo or screenshot, keep PNG and let a palette optimiser shrink it; converting it to JPG adds halos around the edges.