UrsaKit cover for the guide to compressing images without losing quality

Image compression is a trade: you give up a little data to get a much smaller file that loads faster and costs less to store. The skill is knowing which data you can safely give up. This guide explains how to compress images and photos without visible quality loss, how format and quality interact, and the settings that actually matter.

Compression runs locally in your browser, so original photos never leave your device and there is no upload or download wait.

01Lossy, lossless and why re-encoding shrinks a file

Lossless compression stores the same pixels in fewer bytes by removing redundancy — PNG's DEFLATE step (W3C PNG Specification) and WebP's lossless mode work this way. The image is identical after decoding, and the saving comes from how the data is written, not from what it contains.

Lossy compression accepts a small, controlled loss the eye is unlikely to notice. JPEG discards high-frequency detail and stores colour at lower resolution than brightness; WebP and AVIF do similar work with newer models (MDN image format guide). That is how a 4 MB phone photo becomes a sub-megabyte JPEG that looks the same on screen.

Re-encoding also drops metadata. EXIF fields such as GPS coordinates, camera model and capture time (ExifTool tag list) can be a meaningful share of a small file — and a privacy leak — so a compressor that strips them is doing you two favours at once.

02Compress a batch of images

  1. Add your images — Drop files onto the upload area or click to browse. JPEG, PNG, WebP and other common formats are accepted, and batch upload is supported.
  2. Pick a preset or go custom — Web Optimized, Balanced, Small File and High Quality set quality and format together. Custom unlocks the individual controls, so pick the closest preset and then adjust.
  3. Set the output format — Keep Original Format preserves JPEG, PNG or WebP. Choosing JPEG, PNG, WebP or AVIF converts instead — useful when a photograph was exported as PNG.
  4. Adjust the quality slider — Quality maps to the encoder's rate-distortion setting. 70–80 is the usual web sweet spot; below about 60 you start to see blocking in gradients and ringing around edges.
  5. Resize only if the image is larger than it needs to be — A 4000 px photo displayed at 800 px spends bytes on detail nobody sees. Constrain the long edge to the largest size the layout uses.
  6. Preview and download — Each file shows its original size, new size and saved percentage. Download files individually, or use Download All for the batch.

03Which format for which image

FormatBest forTransparencyTypical saving
JPEGPhotographs, complex colourNoReference point for lossy photos
PNGScreenshots, logos, line art, exact pixelsYesReference point for lossless
WebPAlmost everything on the webYes25–34% below JPEG at equal SSIM; 23–42% below an optimised PNG
AVIFNext-gen web images, biggest savingsYesMuch better than JPEG or PNG, but ship a fallback
GIFShort animations only1-bitPoor — prefer WebP or video

The WebP figures come from Google's own encoder studies: 25–34% smaller than JPEG at the same SSIM index, and 23–42% smaller than size-optimised PNG (lossless study). MDN describes AVIF as offering "much better compression than PNG or JPEG", with the caveat that you should serve a fallback for browsers that lack support (caniuse).

For one-off conversions the dedicated pages handle a single file at a time: JPG to WebP and PNG to WebP move images to the modern format, WebP to JPG goes the other way when a destination rejects WebP, and JPG to PNG or PNG to JPG cover the lossless-editing and photograph cases.

04What the quality slider actually changes

Quality is not a percentage of the original file size; it is a target for the encoder's trade-off between size and fidelity. Raising it from 80 to 100 can double the file size for a difference most people cannot see, while dropping from 80 to 60 can halve it with only minor artefacts.

Compress each image once from the original, not from a previously compressed version. Repeated JPEG encoding is generational loss: artefacts from the first pass are amplified by the second. If you need a different size or format later, start from the source file.

05Before and after

Photo for a web page

Input

beach.jpg — 3.8 MB, 4032×3024, JPEG

Output

beach-1600.jpg — ~0.4 MB, 1600×1200, JPEG, quality 78

Resizing does most of the work; quality 78 keeps sky gradients and skin tones clean.

UI screenshot that must stay crisp

Input

dashboard.png — 1.4 MB, 2560×1440

Output

dashboard.webp — ~0.4 MB, 2560×1440

Keep PNG or lossless WebP when exact pixels matter; lossy JPEG smears text edges.

Logo with transparency

Input

logo.png — 240 KB, 800×800, transparent background

Output

logo.png — ~96 KB, 800×800 (lossless, transparency preserved)

Never convert a transparent logo to JPEG — the transparent area becomes black or white.

Do not re-encode the same file twice

Every lossy save throws away more data. Keep the original and export each derivative from it, instead of compressing an already compressed photo.

06Common compression mistakes

MistakeWhat happensDo instead
Compressing the same JPEG repeatedlyGenerational loss; quality drops on every passKeep the original and re-export from it
Saving a screenshot as JPEGText edges smear and colours bleedUse PNG or lossless WebP for UI and line art
Quality below 60 for photosBlocking in gradients, ringing around edgesStay at 70–80 and resize instead
Converting a transparent PNG to JPEGTransparency turns black or whiteKeep PNG or use WebP / AVIF
Upscaling a small imageLarger file, no extra detailOnly ever downscale
Ignoring EXIFYou may ship GPS coordinates with the photoStrip metadata unless you need it

07Compression and page speed

On most sites the Largest Contentful Paint element is a hero image, and file size is the biggest lever on how fast it appears. Two practices cover most of the gain: serve the smallest format the browser supports (WebP or AVIF with a JPEG fallback), and size the image to the layout instead of letting CSS shrink a huge file.

If the image is above the fold, set width and height attributes and load it eagerly; lazy-load everything below. Compression and correct sizing together beat either one alone.

08Sources

Frequently asked questions

Does compressing an image reduce its quality?

With a lossy format such as JPEG, WebP or AVIF, slightly — usually invisibly at normal viewing sizes. Lossless PNG and WebP compression keep the pixel data identical.

Are my images uploaded?

No. Encoding happens in your browser, so the tool never receives your files and there is no upload or download wait.

What quality setting should I use?

70–80 for most web photos, 80–90 for large images viewed full-screen, and below 60 only for thumbnails. Prefer resizing over aggressive quality reduction.

Why did my PNG get bigger?

PNG is lossless and optimised for flat graphics; for photographs it is a poor fit. Convert photos to WebP or AVIF instead.

Does the compressor keep EXIF data?

Stripping metadata is the safer default for anything you publish. Keep the original file if you need capture time or GPS.

Can I compress many images at once?

Yes. Batch upload is supported and the queue is processed serially, with a result per file.

Is there a file size limit?

Only what the browser can hold in memory. Very large images and long batches are bound by device RAM rather than a server cap.

Back to articles

Related articles

Related tools