To compress a JPEG to 100KB, resize the pixel dimensions first. Then lower the compression setting in small steps. This sequence works for any target: compress jpeg to 100kb, compress jpg to 50kb, or reduce photo to 20kb. File size depends mainly on pixel dimensions, image detail, and the compression level. Resize first, then step the compression down until you hit the limit with the least visible damage.
Why Resize First
JPEG file size depends mainly on pixel dimensions, image detail and the compression setting. Cutting pixel dimensions reduces the number of pixels that must be encoded. That shrinks the file directly. If you lower compression first on a large image, the result may still be too big, and the artefacts will be more obvious when you later resize. Resize first to remove unnecessary pixels. Then you only need a small compression reduction to reach your target.
Realistic pixel sizes for each target:
- For a 100KB target, aim for about a few hundred to a few thousand pixels on the longest side for a typical photo.
- For a 50KB target, aim for about a few hundred to a few thousand pixels on the longest side.
- For a 20KB target, aim for about a few hundred to a few hundred pixels on the longest side.
These sizes assume a moderately detailed photo. A document scan or plain subject can use larger dimensions at the same file size.
Step Compression Reduction
After resizing, lower the compression setting in small steps. Start at a moderate level, then drop by 5 or 10 until you are under the target. Small steps let you stop as soon as you hit the limit, preserving as much detail as possible. If the image is still too large at a very low level, resize smaller or convert to greyscale if appropriate.
Resize First, Then Step Compression Down
This order gives the best balance of size and appearance. If you lower compression too much before resizing, the final image may look blocky even though the file is small. Resizing first removes the need for extreme compression reduction.
Hitting Exact File Size JPEG Targets
To reach an exact file size jpeg, for example 100KB exactly, follow these steps:
- Resize the image to the recommended pixel dimensions for your target.
- Save a copy at a moderate compression level and check the file size.
- If the file is too large, lower compression by 5 and save again.
- Repeat until the file is at or just under the target.
- If the file is too small at a moderate level, raise compression or use larger pixel dimensions.
For a jpeg under a certain size for a form, you can often use larger dimensions and a moderate compression setting.
Adjusting for Image Content
Photos of plain subjects compress far smaller than detailed or noisy photos. Documents and flat backgrounds are the easy cases. If you are compressing a document scan, use larger pixel dimensions and still hit a small file size. For a detailed photo with grass, hair, or fine patterns, you need smaller dimensions or a lower compression setting.
Convert to Greyscale for Documents
Converting a document scan to greyscale removes colour data and reduces size. This can cut the file by roughly one third without changing the compression setting. After conversion, resize and step compression down as usual.
Removing Metadata to Save Kilobytes
Removing metadata such as EXIF and embedded thumbnails saves a few kilobytes. This alone will not turn a file that is slightly over into one under the limit, but it helps when you are very close. Most image editors have an option to strip metadata when saving. Combine this with resizing and compression adjustment for the best result.
Checking Form Rules for Pixel Dimensions
Always check the form's pixel-dimension rules as well as its file size limit. Some forms reject images that are too wide or too tall, even if the file size is under the limit. Resize the image to fit both the dimension rule and the size limit. If the form does not specify dimensions, use the realistic sizes listed earlier.
Tools That Can Help
Apply this method in any image editor that lets you resize and adjust compression. For a quick online option, compressjpeg.onl can shrink JPEG, PNG and WebP images. The same resize then step compression down approach works there.