How to compress images without losing quality

Most photos can lose half their file size with no difference you’d notice on screen. The trick is doing things in the right order.

By the ToolSnappy Team · Updated · 3 min read

A photo straight from a modern phone is often 3–6 MB. That’s fine for printing, but it’s far more than a website, an email attachment or an online form needs. Large images make pages slow to load, which hurts both visitors and search rankings; Google counts a Largest Contentful Paint of 2.5 seconds or less as "good", and an oversized hero image is one of the most common reasons sites miss it.

"Without losing quality" really means without losing quality you can see. Here’s how to get there.

1. Resize before you compress

This is the single biggest win and the step most people skip. A 4000 × 3000 pixel photo shown in a 1200-pixel-wide column carries more than ten times the pixels anyone will see. Scale it down to the largest size it will actually be displayed (doubled for sharp high-density screens if you like), and the file shrinks dramatically before any compression happens.

2. Choose the right format

Which image format to use
FormatBest forNotes
JPGPhotosLossy. Small files, no transparency. Supported everywhere.
PNGLogos, screenshots, graphics with textLossless and supports transparency, but large for photos.
WebPAlmost everything on the webSupports lossy, lossless and transparency. Works in all current major browsers.

Google’s own tests found WebP lossless images about 26% smaller than PNGs, and lossy WebP images 25–34% smaller than comparable JPGs. If your image is going on a website, WebP is usually the best choice. If it’s going into a form or an app that only accepts JPG, use JPG.

A common mistake is saving a photo as PNG. Because PNG keeps every pixel exactly, a photo saved as PNG can be several times larger than the same photo as a high-quality JPG.

3. Pick a sensible quality setting

JPG and WebP let you choose a quality level, usually from 0 to 100. The relationship isn’t linear: dropping from 100 to 85 often halves the file with no visible change, while dropping from 60 to 40 saves little and starts to show blocky artifacts.

  • 80–85% for photos where detail matters, such as product images or portfolios.
  • 70–80% for most web images and blog photos.
  • 50–65% for small thumbnails, where artifacts are hard to spot.

Always compare the result with the original at the size it will be viewed. Watch skies, skin tones and areas of smooth color; that’s where compression shows first.

4. Strip metadata

Phone photos carry EXIF metadata: camera model, settings, date and often the GPS location where the photo was taken. It adds a little weight and can reveal more than you intend when you post a picture of your home. Re-encoding an image in the browser, as our compressor does, saves only the pixels, so this metadata is removed.

5. Don’t compress the same file twice

Each time you re-save a JPG, it loses a little more detail. Keep your original and always compress from it, not from a copy you’ve already compressed.

A quick workflow

  1. Keep the original photo somewhere safe.
  2. Resize it to the largest size it will be displayed.
  3. Save as WebP for the web, or JPG for maximum compatibility.
  4. Start at quality 80, check it, then adjust up or down.
  5. Use descriptive file names and alt text when you publish, which helps accessibility and image search.

Frequently asked questions

What is the best image size for a website?

Make the image as wide as the largest space it fills on the page, or up to twice that for high-density screens. For most content images, that means somewhere between 1200 and 2000 pixels wide.

Does compressing an image reduce its resolution?

No. Compression changes how the pixels are stored. Resolution only changes if you resize.

Is lossless compression better?

It keeps every pixel, which matters for graphics and screenshots. For photos, good lossy compression gives much smaller files that look the same.

Sources

This guide is for general information and isn’t financial, tax, legal or medical advice. Figures were checked against the sources above on the date shown.

Tools mentioned in this guide

Image CompressorImage ResizerImage Converter
PDFHow to compress a PDF without ruining itImagesHow to convert HEIC to JPG on any device