How to reduce image file size without losing quality

Learn how lossy and lossless compression work, what the quality slider does, why PNGs won't shrink and how small images should be for web and email.

Your phone photo is 5 MB, the upload form caps files at 2 MB, and your online store takes forever to load. Most of the time the problem isn't the picture itself but the way it was saved. You can usually cut the file size in half, or far more, without anyone noticing a difference on screen.

The good news is that a typical photo file holds far more information than a screen can show, and most of the surplus can go. Keep the image compressor open in another tab: after each section you can try the idea on your own photos and watch the numbers change.

Why are image files so large?

An image's file size depends on two things: how many pixels it has and how much information is stored per pixel. A 12-megapixel photo (4000 × 3000) contains 12 million pixels. Stored raw, with red, green and blue values for each one, that's roughly 36 MB.

Image formats exist precisely so we don't have to store all of that. They differ in how they save space, and that's where lossy and lossless compression come in.

Lossy vs. lossless compression

Lossless compression (PNG, lossless WebP) packs the data more efficiently, much like a ZIP file. When you open the image, every pixel comes back exactly as it was. Lossy compression (JPEG, lossy WebP) throws away fine detail and some of the color information, which the eye is less sensitive to than brightness, and that's why it produces much smaller files.

LossyLossless
FormatsJPEG, WebPPNG, lossless WebP
Pixels after decodingApproximatedIdentical to the original
Typical sizeMuch smallerLarger
Best forPhotosScreenshots, logos, graphics with text

What does the quality slider actually do?

The quality setting tells the encoder how much detail it may discard. It is not a percentage of the final size: 50% quality doesn't mean half the file. Typically, dropping from 100% to around 80% cuts the size dramatically with almost invisible loss, while below 50% the damage starts to show.

That damage has a name: compression artifacts. In JPEG they appear as square blocks in skies and flat walls, and as faint "ringing" around text and sharp edges. Busy, textured photos such as foliage or sand hide compression much better than photos with smooth areas.

Illustrative chart: file size grows slowly up to about 80% quality and shoots up near 100%; the 60% to 80% range is highlighted as the sweet spot.sweet spot60% to 80%10%60%80%100%Quality settingFile size
Typical behavior of a JPEG or WebP photo (illustrative): the last few quality points cost a lot of kilobytes for almost no visible gain.

Why doesn't PNG have a "quality" setting?

Because it's lossless: it stores every pixel exactly, so the encoder has nothing to discard, and a quality slider has no effect on it. The usual ways to genuinely shrink a PNG are reducing its color palette (called quantization, which tools such as pngquant do by limiting the image to 256 colors or fewer), reducing its dimensions, or switching formats.

In the compressor, switching formats takes one click: choose WebP as the output and the PNG gets lossy compression while keeping its transparency. Safari can't encode WebP in the browser, so that option is disabled there. If you're unsure which format suits each image, the PNG vs JPG vs WebP guide compares all three.

The biggest win: right dimensions, then compression

A common mistake is compressing a 4000-pixel-wide photo that will be shown in an 800-pixel slot. No quality setting fixes that waste. Halving both width and height leaves a quarter of the pixels, which usually saves more than any quality tweak.

  1. Resize to the size the image will actually be displayed at (see how to resize without distortion).
  2. Pick the format: JPEG or WebP for photos; PNG or WebP for images with transparency or text.
  3. Compress at 60% to 80% quality and compare before and after by zooming into smooth areas and edges.

How small should an image be? Rules of thumb by destination

A privacy bonus: EXIF metadata

Phone photos carry EXIF metadata with the date, device model and often the GPS coordinates of where they were taken. When the image is redrawn in the browser during compression, that data isn't copied over. You save a few kilobytes and avoid publishing your home address along with the photo of the couch you're selling.

There's one important exception: if the compressed version would be larger than the original, or the browser can't produce the chosen format, the tool hands back your original file, metadata included. Check the note shown on each image before publishing a sensitive photo.

Compress your images now

With the image compressor you can drop in one or many photos, adjust the quality and see the original size, the new size and the percentage saved for each file. If the compressed version ends up larger, the tool keeps your original. Everything runs in your browser, and no image is uploaded to a server.

Frequently asked questions

Why do two photos at the same quality end up so different in size?

Because file size depends on content. Clear skies, plain walls and blurred backgrounds compress very well; foliage, hair, sand and the noise in night shots have detail everywhere and weigh more. At the same setting, a misty landscape can take half the space of a photo of dense undergrowth.

Is a JPEG saved at 100% quality lossless?

No. Even at the maximum setting JPEG is still lossy; it just discards as little as possible. That's why a 100% JPEG is usually much larger than a 90% one with no visible difference. To store an image with zero loss, use PNG or lossless WebP instead.

Will a compressed image look worse when printed?

It depends on how hard you compress. At high quality (85% or above) with the original dimensions intact, prints usually look the same. What really hurts printing is removing too many pixels. For print, keep the resolution and compress moderately; for screens, you can compress more aggressively.

Which format should I use for website photos?

WebP is the most practical and compatible choice today: every current browser supports it, and it produces noticeably smaller files than JPEG at similar visual quality. AVIF compresses even further but has less support outside browsers. JPEG remains the safe fallback for email and older systems.

Why do the colors look slightly different after compressing?

Recent phones often save photos with a wider color profile, such as Display P3. When the browser redraws the image it works in sRGB and doesn't embed that profile in the new file, so very saturated tones, like vivid reds and greens, can look slightly duller. For everyday photos the difference is usually invisible.

References