Two ways to compress
By quality is best when you simply want smaller files and do not have a strict limit. A value between 70 and 80 is a good balance for photos on websites, in email and in chat apps. Around 85–90 is safer for images with fine detail, text or smooth gradients.
To a target size is for when a website or form says something like “maximum file size 200 KB”. Enter the limit and the tool runs a binary search over quality settings, encoding the image several times until it finds the highest quality that still fits. If even the lowest reasonable quality is too big, it reduces the width and height in small steps, because pixel count is the other big factor in file size. The result is guaranteed to be at or under your limit.
What makes an image file large?
File size depends mostly on three things: the number of pixels, the amount of fine detail, and the format and quality setting. A 12-megapixel photo has 12 million pixels, far more than most screens show; a website hero image rarely needs more than 2,000 pixels across. Detailed scenes such as foliage, gravel or crowds take more bytes than skies or plain walls. And the format matters: AVIF and WebP are more efficient than JPG, and all three are far more compact than PNG for photographs.
So if compression alone does not get you where you need to be, resizing the image first is often the most effective step. Halving both dimensions removes three-quarters of the pixels.
Which format compresses best?
- JPG: universally accepted; the safest choice for forms and uploads.
- WebP: about 25–35% smaller than JPG at similar quality and keeps transparency; good for websites.
- AVIF: often 50% smaller than JPG, but slower to encode and not accepted by every upload form.
Compress to common sizes
Many upload forms have fixed limits. Pages for the most common ones are pre-set: compress to 20 KB, 50 KB, 100 KB, 200 KB, 500 KB and 1 MB.