Skip to content

How to compress images for the web: JPEG, WebP or PNG

By Priyabrata Saha · Published 4 November 2026

Short answer

Resize to the size the page actually displays, then save photographs as WebP or JPEG at about 75–85% quality and graphics or screenshots as PNG or WebP. Compare the before and after sizes and the preview; stop lowering quality when you can see the difference.

Resize first

The biggest saving rarely comes from the quality slider. A phone photo is often 4032 × 3024 pixels, about 12 million pixels, while an article column might show it 800 pixels wide. Halving the width removes three quarters of the pixels before any compression happens.

Image Compressor has a maximum-width setting for this. At 1600 pixels wide, a 4032 × 3024 photo becomes 1600 × 1200 and keeps its shape. It never enlarges an image that is already smaller than the limit.

Choosing the format

  • JPEG: photographs. Universally accepted by upload forms and email. No transparency.
  • WebP: photographs and graphics. Usually smaller than JPEG at similar quality and supports transparency. Supported by all current browsers, but some older software and upload forms still reject it.
  • PNG: screenshots, diagrams, logos and anything with text or sharp edges. Lossless, so it never blurs, but large for photographs.

Choosing a quality setting

Quality is a trade between file size and artefacts. For most photos, 75–85% removes the bulk of the file size with no difference you can see at normal viewing distance. Below about 60%, smooth skies and skin begin to show blocks and banding, and edges pick up halos.

There is no single right number because it depends on the picture. Image Compressor updates the preview and the before and after sizes as you move the slider, so you can find the point where the image still looks right and stop there.

When compression makes a file bigger

Re-encoding an image that is already well compressed can increase its size, especially a PNG saved by an optimiser or a JPEG at low quality. Image Compressor shows a warning when this happens. Converting a PNG photo to WebP is often the better move, and if nothing helps, keep the original.

Transparency and backgrounds

JPEG cannot store transparency. When a transparent PNG is saved as JPEG, the transparent areas have to become a colour; the tools here fill them with white, or with the background colour you choose in Image Converter, rather than leaving them black. If the transparency matters, use WebP or PNG.

Location data and privacy

Phone photos often carry EXIF metadata, including the camera model, the time the photo was taken and GPS coordinates. Re-encoding an image through a browser canvas does not copy that metadata into the new file, so compressing a photo here also removes its location. Keep the original if you need the metadata for your own records.

A quick checklist

  1. Decide the largest size the image will be displayed at.
  2. Set that as the maximum width in Image Compressor, or resize in Image Resizer.
  3. Choose WebP or JPEG for photos, PNG or WebP for graphics.
  4. Lower the quality until the preview just starts to look worse, then go back up a step.
  5. Check the final size and download.

Tools used in this guide