How to Compress Images Without Losing Quality
Most photos can lose half their file size or more with no difference you'd notice. Here's how to choose settings that keep images sharp.

On this page
- What's the difference between lossy and lossless compression?
- What quality setting should you use?
- Does the file format matter?
- Why should you resize before compressing?
- Does removing metadata make images smaller?
- How to compress an image step by step
- How do you check that quality survived?
- What are the most common compression mistakes?
A photo straight off a modern phone often weighs 3 to 6 MB. Put twenty of those on a web page and you've asked every visitor to download a small app before they can read anything. The good news is that most of that weight is invisible detail: data your eyes can't distinguish at normal viewing size. Strip it out carefully and the file gets dramatically smaller while the picture looks the same.
The key word is "carefully." Push too hard and you get blocky skies, smeared skin and halos around text. This guide walks through how compression works, which settings sit in the sweet spot, and how to check you haven't gone too far.
What's the difference between lossy and lossless compression?
Every image compressor uses one of two approaches, and knowing which one you're using tells you what to expect.
Lossless compression rewrites the image data more efficiently without changing a single pixel. Decompress it and you get back exactly what you started with. PNG works this way, and so does lossless WebP. The savings are real but modest, often 10 to 30 percent on a PNG that was saved without optimization.
Lossy compression throws away information the encoder judges you're unlikely to notice: subtle color variations, fine texture in busy areas, detail in shadows. JPG is the classic lossy format, and WebP and AVIF both have lossy modes too. This is where the big savings live. A 5 MB photo can often drop to 500 KB or less.
| Item | Lossless | Lossy |
|---|---|---|
| Pixels after decoding | Identical to original | Approximately the same |
| Typical savings | Small to moderate | Large |
| Best for | Logos, screenshots, line art, images you'll edit again | Photos and complex images |
| Formats | PNG, lossless WebP, GIF | JPG, lossy WebP, AVIF |
| Risk | None | Artifacts if pushed too far |
"Without losing quality" in practice means one of two things: lossless compression, where nothing changes at all, or lossy compression tuned so carefully that nobody can see the change. For photos, the second option is almost always the right call.
What quality setting should you use?
Most compressors give you a quality slider from 0 to 100. It isn't a percentage of anything; it's a dial that controls how aggressively the encoder discards detail. And the relationship between the number and file size isn't linear.
Going from 100 to 90 usually cuts a JPG's size dramatically with no visible change. Going from 90 to 80 saves a good chunk more, still invisibly for most photos. Below about 70, savings flatten out while artifacts start to appear: banding in gradients, blockiness in flat areas, a fuzzy "ringing" around sharp edges.
That's why 70 to 85 is the range most people settle on. Here's a rough guide:
| Image type | Suggested quality | Why |
|---|---|---|
| Hero images and portfolio photos | 80–85 | Large on screen, so flaws are easier to spot |
| Blog and product photos | 75–80 | Good balance for typical content widths |
| Thumbnails and small previews | 65–75 | Small display size hides artifacts |
| Images with text or sharp graphics | 85+ (or use PNG) | Lossy compression blurs hard edges |
These are starting points, not rules. A photo of a foggy beach with smooth gradients will show banding sooner than a busy street scene, where the texture hides compression noise.
Tip: Try two or three settings on the same image and compare them side by side at 100% zoom. You'll quickly learn where your own threshold sits.
Does the file format matter?
A lot. Choosing the right format can save more than any quality slider.
JPG is the safe default for photos and works everywhere. PNG is lossless and supports transparency, which makes it ideal for logos, icons and screenshots, but it's a poor choice for photographs: a photo saved as PNG can easily be five times larger than the same photo as a good JPG.
WebP and AVIF are newer formats that typically produce smaller files than JPG at similar visual quality, and both support transparency. Current versions of the major browsers support them. If your images are headed for a website, converting to WebP is one of the easiest wins available. You can switch formats with the Image Converter, and our comparison of WebP vs JPG vs PNG explains the trade-offs in more depth.
A quick rule of thumb:
- Photo for the web: WebP or AVIF, with JPG as a fallback
- Photo for email or sharing: JPG
- Logo, icon or graphic with flat colors: SVG if you have the vector, otherwise PNG or lossless WebP
- Screenshot with text: PNG or lossless WebP
Why should you resize before compressing?
This is the step people skip, and it's often the biggest win of all.
A 12-megapixel phone photo is around 4000 × 3000 pixels. If your blog's content column is 800 pixels wide, the browser shrinks that image down on screen anyway. You're shipping roughly 12 million pixels to display about half a million. No compression setting can make up for that.
Resize first, then compress. Bringing a 4000-pixel-wide image down to 1600 pixels (enough for high-density screens at 800 CSS pixels) cuts the pixel count by about 84 percent before compression even starts. The Resize Image tool lets you set exact pixel dimensions, and our guide to resizing images without losing quality covers the details.
Some practical targets:
- Full-width hero image: 1920 to 2400 pixels wide
- Blog content image: 1200 to 1600 pixels wide
- Email newsletter image: about 600 pixels wide, or 1200 for sharp display on high-density screens
- Thumbnail: 300 to 600 pixels wide
Don't go the other way, though. Enlarging a small image doesn't add detail; it just spreads the existing pixels thinner.
Does removing metadata make images smaller?
Yes, a little. Photos carry EXIF metadata: camera model, lens, exposure settings, date and time, and often GPS coordinates. Some files also include embedded thumbnails and color profiles. Altogether this can add anywhere from a few kilobytes to more than 100 KB.
On a single large photo, that's a small fraction of the total. On a page of small thumbnails, it can be a meaningful share of each file. The bigger reason to strip it is privacy: a photo taken at home can reveal your address through its GPS tags. The Remove EXIF Data tool clears it out, and our guide to image metadata and privacy explains what's stored and why it matters.
Note: Keep the color profile if you can. Stripping an embedded profile from a photo shot in a wide color space can make colors look duller in some browsers. Most good compressors keep the sRGB profile and remove the rest.
How to compress an image step by step
Here's a workflow that works for nearly any photo:
- Start from the original. Not a screenshot of it, not a copy downloaded from a chat app (those are usually already compressed).
- Resize to the largest size it will actually be displayed at, allowing 2× for high-density screens if it's going on a website.
- Pick the format. WebP for the web, JPG for general sharing, PNG for graphics with sharp edges or transparency.
- Compress at quality 80 as a starting point using a tool like Compress Image. It runs in your browser, so the photo never leaves your device.
- Compare before and after (more on that below).
- Adjust. If it looks identical, try 75 or 70. If you see artifacts, go back up.
- Save with a clear file name and keep the original somewhere safe.
If you need to hit an exact size limit rather than just "smaller," such as a form that only accepts files under 100 KB, our guide on compressing an image to 100 KB covers that case.
How do you check that quality survived?
Looking at a thumbnail tells you nothing. Compression artifacts hide at small sizes, which is partly why the technique works so well. To judge fairly, open the original and the compressed version at 100% zoom and flip between them.
Look in the places where artifacts appear first:
- Smooth gradients like skies, studio backdrops and skin. Watch for visible bands or steps.
- Sharp edges like text, product outlines and hair against a plain background. Watch for fuzzy halos or "mosquito noise."
- Flat areas of color. Watch for 8 × 8 pixel blocks, the classic JPG signature.
- Fine repeated patterns like fabric or brickwork. Watch for smearing or odd moiré.
If you can't find a difference after a minute of honest flipping, nobody else will find one on a phone screen. Check the file size too: if a lower setting barely shrinks the file, there's no point accepting any extra risk for it.
What are the most common compression mistakes?
A few habits cause most of the bad results people see:
- Re-compressing already-compressed files. Each lossy save stacks new artifacts on top of old ones. Always go back to the source.
- Saving photos as PNG because "PNG is higher quality." It's lossless, but that just means it faithfully stores a massive file.
- Saving text-heavy graphics as low-quality JPG. Hard edges and flat color are exactly what JPG handles worst.
- Compressing without resizing. A 6000-pixel image at quality 60 often looks worse and weighs more than a 1600-pixel image at quality 80.
- Judging at thumbnail size. Always compare at full size before you publish.
Get those right and "compress without losing quality" stops being a contradiction. You're simply removing data that was never doing any work.
Written by ImgPress Editorial
Our editorial team writes and maintains practical guides on working with images. Articles are reviewed for accuracy and updated when tools or best practices change. Spotted an error? Let us know.
Questions readers ask
Does compressing an image reduce its resolution?
Not necessarily. Compression changes how pixel data is stored, while resolution is the number of pixels. You can compress a 4000 by 3000 photo and keep every pixel. Resizing is a separate step that lowers the pixel count.
Can I compress a JPG multiple times?
You can, but every lossy save throws away a little more detail and artifacts build up. Always compress from the original file rather than re-compressing a copy that has already been compressed.
What is the best quality setting for JPG compression?
For most photos, a quality setting between 70 and 85 gives a large size reduction with no visible difference at normal viewing sizes. Go higher for images with fine text or gradients and lower for small thumbnails.

