Skip to content

Guides

How to Compress Images Without Losing Quality

Compress images without losing quality: what the quality slider really does, why resizing beats every setting, and the settings to use. Free, in-browser.

· 8 min read

Most images on the web are several times larger than they need to be, and the fix is rarely a cleverer compressor. It is a handful of unglamorous steps in the right order, and the first one matters more than any quality slider. Do them and a 6 MB phone photo becomes an 80 KB web image nobody can tell from the original.

The quick answer

Four steps, in this order:

  1. Resize to the size you actually display. This does more than any quality setting.
  2. Match the format to the content. WebP or JPG for photographs, PNG or lossless WebP for graphics and screenshots.
  3. Compress once, from the original, starting around quality 80 for photographs.
  4. Judge at 100 percent zoom against the original, gradients first, then edges.

The rest of this article explains why those steps hold.

What “without losing quality” honestly means

There are two kinds of compression.

Lossless compression rebuilds the original file bit for bit. PNG, lossless WebP and ZIP work this way. Nothing is thrown away, so nothing can look worse. The trade is that photographs are full of noise and subtle gradients, which lossless algorithms cannot describe compactly, so a lossless photo is usually several times bigger than a lossy one.

Lossy compression discards detail on purpose, choosing the detail your eyes are worst at noticing. JPG, lossy WebP, AVIF and HEIC work this way. The file gets dramatically smaller and the image is permanently different from the original.

So strictly speaking, you cannot compress a photo hard without losing quality. What you can reach is visually lossless: a file whose differences exist in the data but are invisible at the size the image is actually viewed. That is the honest goal, and for photographs it is achievable at roughly a tenth of the original size.

How quality sliders actually work

A JPG or WebP encoder does not store your pixels. It converts blocks of the image into frequency components, divides those by numbers from a quantisation table, and rounds the result. Coarser rounding means fewer distinct values to store, so a smaller file, and detail that can never come back.

The quality slider simply scales that table. Three consequences follow.

Quality 80 does not mean 80 percent of the quality. It is a position on a scale, not a percentage of anything, and the relationship to the visible result is strongly non-linear. Going from 95 to 85 usually saves a lot of file size and costs almost no visible quality. Going from 60 to 50 saves little and wrecks the image.

The numbers are not comparable across formats. WebP at 80 and JPG at 80 are different encoders doing different maths. A lossy WebP generally lands below a JPG of similar appearance, but never assume the same slider position gives the same look.

They are not always comparable across tools either. Two apps can both report quality 85 and produce different files. Treat any recommended number as a starting point and check with your eyes.

The single biggest win: resize before you compress

If you change one thing, change this. File size roughly tracks pixel count, and pixel count scales with the square of the dimensions, so halving the width removes about three quarters of the data before the compressor does anything.

A worked example. A phone camera typically produces 4032 by 3024 pixels, which is 12,192,768 pixels, about 12 megapixels. Say that photo appears in a blog post at 1600 pixels wide. Resized to 1600 by 1200 it holds 1,920,000 pixels. It is 4032 / 1600 = 2.52 times narrower, and 2.52 squared is about 6.35, so you have removed roughly 84 percent of the pixels. No quality setting competes with that, and unlike lowering quality it adds no artefacts, because nothing is being approximated.

This is why so many pages are slow. A 4000 pixel wide image in a 700 CSS pixel column carries about eight times more pixels than even a 2x screen can use, and over thirty times more than a 1x screen.

Work out the real display size first. A full-width hero needs 1920 to 2560 pixels to cover high-density screens, an in-content image 1200 to 1600, a thumbnail about 400. Set it with the image resizer, then compress.

Strip the metadata

Camera files carry EXIF blocks: model, lens, exposure, timestamps, GPS coordinates, sometimes an embedded preview. On a large photo that is a rounding error. On a 30 KB thumbnail it can be a meaningful share of the file.

Tinyvert re-encodes the pixels and does not carry EXIF across, so metadata is stripped automatically. For anything you publish that is usually what you want, since you are not broadcasting where a photo was taken. If you rely on capture dates or GPS tags, keep the originals.

Match the format to the content

Compression algorithms are tuned around assumptions about the image. Break the assumption and you pay for it.

Photographs have soft gradients and noise, which is exactly what lossy compression is designed for. JPG or WebP will be far smaller than any lossless option. Use JPG to WebP when the destination is a website.

Flat graphics such as logos, icons and charts have large areas of identical colour and hard edges, which lossy encoders smear. Lossless PNG or lossless WebP is smaller and cleaner here, and PNG to WebP usually wins on size, with the quality slider at 100 for WebP’s lossless mode so every pixel stays exact.

Screenshots with text are the worst case for lossy compression. Small type is high-frequency detail, exactly what quantisation discards first. Keep them lossless, and if one is still too big, crop or resize rather than lowering quality.

For the longer comparison, see WebP vs PNG vs JPG and the best image format for a website in 2026.

Why text and red edges suffer: chroma subsampling

Most JPG encoders split an image into brightness (luma) and colour (chroma), then store the colour channels at half resolution in each direction. This is 4:2:0 subsampling. It works because human vision resolves brightness detail far better than colour, and it removes a large chunk of data essentially for free.

It stops being free when the detail you care about lives in colour, not brightness. Red text on a dark background, a thin red line on grey, or a saturated logo edge can end up smeary or fringed even at a high quality setting, because the colour around that edge was stored at half resolution. That is why red often looks worse than any other colour in a compressed JPG.

For graphics and text, skip lossy JPG and use PNG or lossless WebP. For photographs, subsampling is almost never a problem.

Be honest about PNG

A lossless PNG optimiser cannot do much on its own. The format already applies a filtering and deflate pass, so re-running it saves a modest amount at best. Three things move the needle: fewer pixels, fewer colours, or a different format. Palette reduction to 256 colours shrinks flat graphics hard, though it alters the image and is not what a straight re-encode does. Resize it, convert it to WebP, or, if it is a photograph saved as PNG by mistake, convert it to JPG and watch it shrink by an order of magnitude.

Generational loss and why you keep masters

Open a JPG, save it, open it again, save it again. Each save re-quantises data that was already approximated, and because every app resizes, crops or picks its own quality, the errors compound rather than settling. That is generational loss, and it is why a much-shared meme looks photocopied.

The defence is one rule: always compress from the original. Keep a master somewhere you will not overwrite, treat every compressed file as disposable, and go back to the master when you need a different size. If your masters are iPhone HEIC files, they are already an efficient archive format, as covered in HEIC vs JPG.

A settings cheat sheet

Starting points, not laws. Check before you ship.

Use caseLongest edgeFormatQualityRough size target
Web hero image1920 to 2560 pxWebP75 to 82under about 200 KB
Blog or in-content image1200 to 1600 pxWebP75 to 80under about 100 KB
Email attachment1600 pxJPG75 to 85under about 500 KB each
Social media post1080 to 2048 pxJPG or WebP80 to 85platform re-encodes anyway
Print, A4 at 300 dpiaround 3500 pxJPG92 to 95size is not the concern
Thumbnail300 to 500 pxWebP70 to 75under about 30 KB
Screenshot with textnative sizePNG, or WebP at quality 100losslessresize is the only lever
Archive masteroriginalPNG, or original camera filelosslesskeep it untouched

Social platforms re-encode whatever you upload, so a heavily compressed file takes two lossy passes. Upload good quality at the right dimensions and let the platform compress once.

How to check your result honestly

Shrinking the browser window until an image looks fine proves nothing. Judge it properly.

  1. View at 100 percent zoom, one image pixel to one screen pixel. Anything smaller hides artefacts.
  2. Look at flat gradients first. Skies, studio backdrops, shadows and out-of-focus areas are where blocking and banding appear earliest.
  3. Then look at sharp edges. Text, branches against sky, saturated red or blue boundaries. Halos and fringing show up here.
  4. Flip between original and compressed in the same position rather than viewing them side by side. Your eye catches changes far better than differences.
  5. Check it where it will live. An image for a phone screen may be softer than one printed at A4.

If you cannot tell them apart at 100 percent, you have not lost quality in any sense that matters. If you can, go up five or ten points and try again. The file will grow less than you expect.

The workflow, step by step

  1. Start from the original, not last week’s export.
  2. Crop first, if you are cropping. No point compressing pixels you will discard.
  3. Resize to the real display size with the image resizer. This does most of the work.
  4. Pick the format: for photographs going on a website, convert with JPG to WebP; for graphics and screenshots use PNG to WebP at quality 100, or keep PNG. The compressor keeps whatever format you feed it.
  5. Compress with the image compressor, starting around quality 80 for photographs.
  6. Check at 100 percent zoom against the original, gradients first, then edges.
  7. Adjust once. Too soft, go up. Comfortably under target, try going down.
  8. Keep the master. Archive the original, ship the output.

Sending a set of images as one document is tidier with image to PDF than as a folder of attachments.

All of this runs inside your browser on Tinyvert. HEIC files are decoded by a WebAssembly build of libheif and everything is encoded with the browser’s own Canvas API, so your images are never uploaded, never queued on a server, and never stored anywhere that could be breached. The free tier handles 5 files per batch as often as you like, and Pro removes the batch limit for a one-time US$9.

Run those four steps in order and you will ship files several times smaller that nobody notices you compressed.

Frequently asked questions

Can you really compress an image without losing any quality?
Mathematically, only lossless compression keeps every pixel identical, and it rarely shrinks a photo by much. What people actually want is visually lossless: a much smaller file that looks the same at normal viewing size. That is very achievable, and it is what the image compressor is tuned for.
What quality setting should I use for JPG?
For photographs, 80 to 85 is the sweet spot for web and email, and 90 to 95 for anything you will print or edit further. Below about 70 you start to see blocking in skies and halos around sharp edges. Quality numbers are not comparable between formats or encoders, so re-check visually when you switch tools.
Why is my PNG still huge after compressing it?
PNG is lossless, so a strictly lossless optimiser can only reorganise the data, not discard any. The levers that work are fewer pixels, fewer colours or a different format. Shrink it with the resizer, or convert it with PNG to WebP and set the quality slider to 100 for its lossless mode, which is usually smaller than PNG.
Does compressing the same file over and over make it worse?
Yes, if it is a lossy format. Every save re-quantises data that was already approximated, and because each app resizes, crops or picks its own quality setting, those errors compound instead of settling. This is called generational loss. Always compress from your original master rather than from a file you compressed yesterday.
Will compressing remove my photo's location data?
On Tinyvert, yes. Files are re-encoded in your browser and EXIF metadata is not carried across, so GPS coordinates, camera model and capture dates are stripped. That is a privacy win when publishing, but keep the original if you need those tags.
Is there a limit on how many images I can compress?
The free tier handles 5 files per batch, with no limit on how many batches you run. Tinyvert Pro is a one-time US$9 upgrade that removes the batch cap. Everything runs in your browser either way, so nothing is uploaded.

Convert images without uploading them

Every Tinyvert tool runs entirely inside your browser. Your photos are never sent to a server, there is no sign-up, and batches download as a single ZIP.

Browse all tools

← All articles