How to use Compress Images

  1. Click "Select files" under Images Input and choose one or more images.
  2. In Compression options, set the maximum output file size per image in megabytes (default 1).
  3. Enter the image quality percentage (default 80). A lower value gives a smaller file.
  4. Check the File sizes panel, which shows the total original size and the total compressed size in KB.
  5. Click Download to save a single image. If you compressed several, use the per-file download buttons or "Download All as ZIP".

Examples

Large camera photo

A 4000x3000 JPEG with the default settings (1 MB, quality 80) is scaled to 1920x1440 and saved as a JPEG at 80% quality. If it is still over 1 MB, further passes lower the quality and the dimensions.

Batch of images

Three images in -> three compressed images, each with its original file name, plus compressed-images.zip containing all of them.

Good to know

  • Images whose width or height is above 1920 px are scaled down so the longer side is 1920 px, keeping the aspect ratio.
  • Every file keeps its file name, and JPEG and PNG files keep their format. PNGs are re-encoded with the UPNG encoder, which limits the number of colors based on the quality setting.
  • The maximum size is a target, not a guarantee. If the first result is over the target or larger than the original, up to 10 more passes lower the quality. If the first result was over the target, each pass also shrinks the dimensions by 5%. The last result is kept even if it is still over the target.
  • EXIF metadata from a JPEG is copied into the compressed JPEG, with the orientation tag reset to 1.
  • Compression runs in your browser in a Web Worker. The worker downloads the browser-image-compression script from cdn.jsdelivr.net, and if the worker fails, compression runs on the page's main thread instead.

Frequently asked questions

Why do my compressed images have fewer pixels?

The tool caps the longer side at 1920 px, so larger images are scaled down to fit. If an image is still over the maximum file size after the first pass, its dimensions shrink by 5% on each extra pass.

Will every file end up under the maximum size I set?

Not always. The compressor makes up to 10 extra passes, lowering the quality each time, and then returns the last result even if it is still above the target.

Does compression keep EXIF data?

For JPEG files, yes: the EXIF block is copied into the compressed JPEG, with the orientation tag set to 1. Other formats are re-encoded from canvas pixels, so their metadata is not copied.

Can I compress HEIC photos?

When you select a HEIC file, it is first converted to JPEG with a .jpg name. That JPEG is then compressed.

More Image Tools