How to reduce image file size without wrecking it
Almost every oversized image is oversized for one of three reasons, and they have to be fixed in the right order. Compressing first is the mistake nearly everyone makes.
Why the file is big
A file's size is roughly the product of three things: how many pixels it has, how much detail is in those pixels, and how aggressively the format was told to compress. In that order of impact.
A modern phone photo is around 4000×3000 pixels — twelve million of them. If the image is going to be displayed 800 pixels wide, you are storing twenty-five times more information than anyone will ever see. No compression setting recovers from that, because the pixels are genuinely there.
The order that works
1. Resize first
Decide how large the image will actually be displayed and resize to roughly that, or twice that if you want it to stay sharp on a high-density screen. For a blog body image, 1200–1600 pixels wide is usually plenty. For a full-width hero, 2000–2560.
This step alone routinely removes 80–90% of the file, at zero visible cost, because you are deleting detail nobody was going to see. Resize an image.
2. Crop what nobody needs
If a third of the frame is empty sky, that third is still costing you bytes. Cropping is free compression with an editorial benefit. Crop an image.
3. Then compress
Now the quality setting is working on an image that is the right size, so it can do its job. Start at 80 and look at the result. On photographs you will not see the difference from the original. On images with large flat areas or text you may need 85–90.
4. Consider the format
Switching a photo from JPEG to WebP takes another 25–35% off for free. If the image is a logo or a screenshot, make sure it is not a JPEG — those compress badly and look worse. See the format guide.
5. Strip the metadata
A camera JPEG carries an EXIF block of a few kilobytes, and sometimes an embedded thumbnail and colour profile worth a hundred kilobytes or more. On a small image that can be a meaningful fraction of the file, and there are privacy reasons to remove it anyway. Strip metadata.
Hitting an exact size, like "under 100 KB"
Plenty of forms impose a hard limit — job applications, government portals, forum avatars. The way to hit one is to binary-search the quality setting: encode, check the size, adjust, repeat. That is exactly what our compress to 100 KB page does automatically, and why it takes a moment longer than a fixed quality setting.
When the target cannot be met, it is nearly always because the dimensions are too large for it. There is a floor: a 4000-pixel-wide photograph cannot become 50 KB without turning to mush, whatever the quality slider says. Reduce the dimensions and try again.
Common targets: 20 KB, 50 KB, 100 KB, 200 KB, 500 KB, 1 MB.
What does not work
Compressing an already-compressed image again. Running a JPEG through a compressor at quality 80 when it was already saved at 75 makes it worse without making it much smaller. Go back to the original.
Saving a photo as PNG to "keep the quality". PNG is lossless, so nothing is lost — and the file will be several times larger than a quality-90 JPEG that looks identical.
Renaming the extension. Changing .png to .jpg does not convert anything. The bytes are unchanged; you have just lied to the operating system. Use a converter.
A worked example
A 4032×3024 iPhone photo, 3.8 MB, destined for a blog post displayed 800 pixels wide:
- Resize to 1600×1200 → about 480 KB
- Compress at quality 80 → about 180 KB
- Convert to WebP → about 130 KB
- Strip metadata → about 128 KB
3.8 MB to 128 KB, a 97% reduction, with no visible difference at the size it will be viewed. Nearly all of that came from step one.
