How to Compress an Image to 100KB Without Wrecking It
Why upload forms reject your photo, what actually makes a file big, the resize-before-you-compress rule that does most of the work, and what lossless really means.
To get a photograph under a size limit, resize it first and compress it second. Almost everyone does it the other way round, which is why their picture ends up small and blurry when it only needed to be small.
Why does an upload form reject my photo?
Because a modern phone camera produces files far larger than most forms were designed for. A photograph off a recent phone is commonly several megabytes; a great many government portals, job boards and exam applications cap uploads at 100KB, 200KB or 1MB.
Those limits are usually about the storage and bandwidth of the system receiving them, and they are rarely negotiable. The file has to get smaller.
What actually makes an image file big?
Three things, in this order of impact:
- Dimensions. The number of pixels. A 4000 by 3000 photo has twelve million of them. Halving both sides to 2000 by 1500 leaves three million — a quarter of the data before any compression is applied at all.
- Compression quality. How aggressively the encoder discards detail. This is the slider marked "quality" in most tools.
- Format. A lossless PNG of a photograph can be ten times the size of a JPEG that looks the same.
That order is the whole trick. If a form wants 100KB and you go straight to the quality slider on a 4000-pixel-wide photo, you will be pushing quality down to the teens and the result will look like it has been through a fax machine. Resize to something sensible first and the same 100KB is easy to hit at a quality nobody would question.
How do I compress an image to exactly 100KB?
Work down the three levers in order:
- Decide the dimensions you actually need. For a document upload or a profile photo, something around 1000 to 1600 pixels on the long edge is almost always plenty. For a passport-style photo, whatever size the form specifies.
- Resize to that. This alone often gets you most of the way.
- Save as JPEG, not PNG, if it is a photograph.
- Lower the quality until you are under the limit. Around 80 percent is usually invisible. Below about 60 you start to see it in skies, skin and flat areas.
- Check what it looks like at full size, not as a thumbnail. Compression damage hides at small sizes.
If a form demands a very small file — 20KB is common on some portals — expect a visible cost, and get there by making the image smaller in dimensions rather than by driving quality into the floor. A sharp small picture reads better than a blurry larger one.
What is the difference between lossy and lossless compression?
Lossy compression throws information away permanently to make the file smaller. Lossless compression packs the same information more efficiently and can be unpacked back to exactly the original.
- Lossy — JPEG, WebP in its lossy mode, AVIF, HEIC. Dramatic size reductions. The discarded detail is gone.
- Lossless — PNG, WebP in its lossless mode, and the "optimise" pass some tools run on a PNG. Modest size reductions. Nothing is lost.
Both are useful, for different files. A photograph should be lossy; there is no sense storing the exact value of every pixel of a cloud. A logo, a screenshot or a diagram should be lossless, because the exact pixels are the point.
Can I compress an image without losing quality?
Yes for a lossless format, and not really for a lossy one — but the phrase usually means something achievable, which is "without losing quality I can see".
Three honest versions of that:
- Truly lossless. Optimising a PNG strips metadata and repacks the pixel data. Nothing changes visually because nothing changes at all. Savings are typically modest.
- Visually lossless. A JPEG at high quality discards detail your eye was never going to resolve. Information is gone, and you will not see it. This is what most compression tools mean.
- Not lossless at all. Pushing quality down until the file hits a number. Fine when a limit forces it; not something to do to your only copy.
The rule that follows: keep the original. Compress a copy. Once the detail is gone there is no tool anywhere that can put it back, and no amount of converting to PNG afterwards restores anything.
Why does compressing the same photo twice make it worse?
Because each lossy save runs the discarding step again on an image that has already been through it. This is generation loss, and it compounds.
Editing a JPEG and saving it as a JPEG, then doing that again next week, is how photographs acquire the blocky halos you see on images that have been shared many times. Always go back to the original and compress once.
What size should images on a website be?
Small enough to load quickly, large enough to be sharp on a good screen. Practical guidance rather than a rule:
- A full-width banner rarely needs to be more than about 1920 pixels wide.
- An image displayed in a 600-pixel column needs about 1200 pixels for a high-density screen, and no more.
- WebP or AVIF over JPEG, where the site can serve them.
- Aim for tens of kilobytes per image, not hundreds.
Page speed is a ranking factor and images are usually the largest thing on a page, so this is often the single cheapest performance work available.
Lonecto's image compressor does this in the browser — nothing is uploaded, which matters when the file is somebody's identity document. The converter is there when the format is the problem rather than the size, and JPEG vs PNG vs WebP covers which one to land on.
Questions
What quality setting should I use for JPEG? Around 80 percent is a good default and is usually indistinguishable from the original. Go lower only when a limit forces it, and look at the result full size.
Does resizing an image reduce file size? Substantially, and it is the most effective lever there is. Halving both dimensions removes about three quarters of the pixel data before compression is applied.
Why is my PNG bigger than the original JPEG? Because PNG is lossless and stores every pixel of a photograph exactly. Converting a JPEG to PNG makes a large file that faithfully preserves the compression damage already in it.
Can I get a photo under 20KB and still have it look fine? At small dimensions, yes. At full size, no. If a form demands 20KB it expects a small image, so reduce dimensions first.
Does compressing an image remove EXIF data? Often, and it depends on the tool. Many strip it, which is a privacy benefit — EXIF can contain the location the photo was taken.
Is it better to compress before or after uploading? Before, whenever you can. Once a service has your original it may keep it, and a smaller upload is faster and less likely to fail.