Home » Guides & How-Tos » Compress an Image to an Exact Size in KB
How to Compress an Image to an Exact Size in KB
By Aurang Zeb Loona — Loona Automation
Most compression advice stops at "make the file smaller". Real life is more specific than that: a job portal wants your photograph at 200KB or less, a signature scan at 20KB, a document upload somewhere under 300KB, a marketplace image below 1MB. The target changes from form to form, and guessing with a quality slider until the number happens to fit is slow and unreliable. This guide explains the three levers that control an image's file size, shows a worked example of hitting an exact target, and lists the mistakes that make people miss.
The Three Levers That Control File Size
An image file's size is decided by three things, and understanding them turns compression from luck into arithmetic:
- Dimensions (pixel count). This is the biggest lever. A 6000 × 4000 photo holds 24 million pixels; resize it to 1200 × 800 and you keep 960,000 pixels — 4% of the original data. Halving the width and height quarters the file, roughly, before anything else is touched.
- Format. JPG is built for photographs and compresses them efficiently. PNG is built for sharp edges — text, logos, screenshots — and produces much larger files for photos. WebP usually beats JPG by a further margin where it is accepted. Converting a photo from PNG to JPG often cuts its size several-fold on its own.
- Quality (compression level). JPG and WebP let you trade detail for size. The top of the scale wastes bytes on differences no eye can see; dropping from quality 95 to 85 typically removes a large share of the file while the picture still looks the same at normal viewing size. Very low settings are where blockiness and smearing appear.
Used in the right order — shrink dimensions first, pick the right format, then fine-tune quality — almost any reasonable target is reachable without wrecking the picture.
A Worked Example: 5.2 MB Down to a 200KB Target
Suppose a job portal asks for a scanned certificate "no larger than 200KB", and your scan is a 6000 × 4000 pixel JPG of 5.2 MB. Watch the levers work in sequence. First, the scan is resized to 1600 × 1067 pixels — still more than enough to read every word on screen or in print at A4 width — which by itself brings the file down to roughly 700KB–900KB. Second, it is saved as JPG (it already is; a PNG version of the same scan would be several megabytes larger). Third, the quality is fine-tuned: at quality 85 the file might read about 260KB, still too big; at quality 78 it lands around 195KB — under the target, with a small safety margin, and the text still crisp. A compress-to-target tool does this last step automatically, testing quality settings until the file fits just under the number you gave it. That is the whole method: big cuts from dimensions, then small, precise cuts from quality.
Step-by-Step with a Free Tool
- Work from the original file — the camera photo or first scan, never a copy that has already been through a messaging app.
- Crop to the subject. Cut away empty borders and background the form does not need.
- Open the Loona Image Compressor and add your image. It runs in your browser, so the file never leaves your device.
- Enter your exact target in KB (for example 200) rather than dragging a quality slider and hoping.
- Compress and inspect the result at full size — zoom into a face or a line of text. If it is not readable, resize less aggressively and compress again from the original.
- Verify the final size in the file's properties before uploading, aiming a few KB under the stated limit.
Common Mistakes
- Compressing before cropping and resizing. Quality is the weakest lever; using it alone to force a huge image into a tiny file is what produces unreadable results.
- Keeping documents in full colour. A black-and-white document scanned in colour carries three channels of data for a one-channel page. Scanning or converting to greyscale can cut a document's size dramatically with no loss of readability.
- Saving a photograph as PNG "for quality". For photos, PNG usually means a file five to ten times larger for no visible gain at form sizes — the single most common reason a file will not fit.
- Uploading the ZIP. If you batch-compressed several images and received a ZIP archive, extract it and upload the image inside; portals reject the archive itself.
- Destroying resolution a document needs. Text must stay readable — for document scans, keep enough pixels that the smallest print is sharp (short side of at least roughly 1,000 pixels for a full page) and let quality do the remaining work.
Frequently Asked Questions
Can any image be compressed to any size?
Almost — but with a trade-off that steepens at extremes. A detailed group photograph forced to 20KB will look poor at any settings, because there is a floor below which the data simply is not there. For very small targets, resize more (the form only displays a small picture anyway) rather than crushing quality further.
Some forms also set a minimum size. How do I make a file bigger?
A few systems reject files that are too small, suspecting a fake or a thumbnail. Re-saving rarely helps honestly — the right fix is to go back to the source: scan at a higher resolution, or use the original uncropped photo, so the larger file contains real detail rather than padding.
Why do two tools give different sizes for the same image and quality?
"Quality 80" is not a universal unit — each encoder interprets the scale differently and makes different choices about colour detail. This is exactly why aiming at a target size, and then verifying the result, beats trusting a slider.
Does compressing an image change its dimensions?
No. Compression changes the file size; resizing changes the dimensions. They are separate operations, and confusing them is why some people end up with a small file whose dimensions a form still rejects — check both requirements every time.
Put the method to work with the free Loona Image Compressor — set any target from 20KB upward, process up to 100 images at once, and keep every file on your own device. For the specific case of application-form photographs, see also our guide to compressing an image to 50KB.