Toolkit Lab

Guides / Image resizing

How to Resize an Image to a Specific File Size

Forms and upload pages often set a file size limit, such as 20 KB, 100 KB or 2 MB. You can meet that limit by changing the size in pixels, the quality setting, or both.

Why file size limits exist

Application forms, government portals and content systems often cap the size of each upload. A photo straight from a phone can be several megabytes, far above a 100 KB limit.

Step 1: reduce the pixel size first

A photo that will be shown at 600 pixels wide does not need 4000 pixels. Lowering the width and height usually removes the most data, so do this first. Keep the aspect ratio locked so the picture is not stretched.

Step 2: set a target size

Enter the limit in KB in the target field. For JPG and WebP, the tool lowers the quality step by step until the file fits, and it stops at the highest quality that still meets the target. PNG files do not shrink this way, so choose JPG or WebP for small targets.

What to expect

Try it yourself

Open the Image Resizer, choose your photo, enter the size and target, and download the result. The image is processed on your device and is not uploaded.