A 5 MB product photo that takes three seconds to load on a website will cost you visitors. A folder of 300 holiday photos taking up 4 GB of storage is unwieldy to back up or share. Image compression solves both problems — but the phrase "without losing quality" is doing a lot of work in the headline of every compression tool on the internet.
The honest answer is that all lossy compression removes some image data. The practical answer is that at the right settings, the removed data is invisible to the human eye under normal viewing conditions. This guide explains the mechanics, gives you specific numbers to work with, and covers when lossless compression is the right choice instead.
Lossy vs lossless compression — the fundamental difference
Lossy compression
Lossy compression permanently discards image information. JPG is the most common lossy format. It works by dividing the image into 8×8 pixel blocks, applying a mathematical transform (DCT — discrete cosine transform), and then quantising the result — rounding numbers to fewer decimal places, which is where data is discarded.
The human visual system is more sensitive to brightness changes than to colour changes, and more sensitive to changes in large smooth areas than to fine detail. Lossy compression exploits this: it preserves the data the eye notices most and discards the data the eye notices least.
At quality 80%, a typical photo JPG is visually indistinguishable from the original at screen viewing sizes. At quality 60%, you may start to see blocking in smooth areas like skies. At quality 40%, artefacts are obvious to most people.
Lossless compression
Lossless compression reorganises and encodes the image data more efficiently — like ZIP compression for files — without removing anything. Every pixel in the decompressed image is identical to the original.
PNG uses lossless compression. So does lossless WEBP. The trade-off is file size: lossless compression achieves 20–40% size reduction at best, while lossy compression at reasonable quality settings achieves 50–80% reduction.
When to use lossless: Logos, icons, screenshots, graphics with flat colours, images with transparent backgrounds, and any image where pixel-perfect accuracy matters (medical imaging, archival photography). PNG is the right choice here.
When to use lossy: Photographs, product images, hero banners, any image with continuous tone and natural colour variation. JPG or WEBP at 75–85% quality is the right choice.
Optimal quality settings for different use cases
Web images (general)
JPG quality: 75–82%
This range is the sweet spot for photographic web images. File sizes are typically 30–50% of the original. At 1920px wide on a screen, quality differences from 75% vs 95% are imperceptible. Google's own image serving infrastructure uses quality settings in this range.
E-commerce product photos
JPG quality: 80–85%
Product photos need to hold up under zoom. Go slightly higher than general web images — 80% is a safe floor. White-background product shots compress particularly well because large areas of uniform colour encode efficiently.
Thumbnails and preview images
JPG quality: 65–75%
Small images displayed at 150×150 or 300×300 pixels are heavily downscaled — at that size, even quality 60% is hard to distinguish from 90%. Don't over-engineer thumbnails.
Print (300 DPI, magazine/brochure)
JPG quality: 90–95% or use TIFF
Print at high resolution shows compression artefacts that aren't visible on screen. Keep source files for print at 90%+ or work with lossless TIFF. Compressing to web quality and then printing will show artefacts at A4 or larger sizes.
Logos and icons
Use PNG lossless or SVG
Logos have sharp edges and flat colours — exactly the kind of content where JPG compression looks worst. Use PNG for raster logos and SVG for vector logos. Never save a logo as JPG.
Should you use WEBP instead of JPG?
WEBP is Google's image format, designed as a successor to both JPG and PNG. It uses a more advanced compression algorithm and typically produces files 25–35% smaller than JPG at equivalent visual quality, and 20–30% smaller than PNG for lossless content.
Browser support: As of 2025, WEBP is supported by all major browsers — Chrome, Firefox, Safari (since iOS 14 / macOS Big Sur), Edge. Support is effectively universal for modern devices.
Use WEBP when: You're uploading to a website or web app, the platform accepts WEBP, and you want the smallest possible file size. Most CMSes (WordPress, Shopify, Squarespace) support WEBP natively or via plugin.
Stick with JPG when: You're uploading to a platform that doesn't accept WEBP (some older forums, email clients, social platforms), sharing with people who may view the file in older software, or printing (printers generally don't accept WEBP natively).
How to compress images with FormatNest
FormatNest's image compressor handles JPG compression with quality settings you control. Here's how to use it:
- Go to FormatNest Image Compressor
- Upload your image — JPG, PNG, or WEBP files are accepted
- Adjust the quality slider if available, or use the default setting (optimised for web use)
- Preview the compressed result and compare file sizes
- Download the compressed image
For JPG compress specifically, FormatNest JPG Compress lets you target a specific quality level and shows you the size reduction before you download.
Batch image compression
If you have dozens or hundreds of images to compress — a product catalogue, a batch of event photos, a set of blog images — doing them one by one is impractical. FormatNest supports multi-file uploads: select all your images at once and download a ZIP of compressed versions.
For very large batches (thousands of images), a command-line tool like ImageMagick or Sharp (Node.js) gives more control and automation capability. But for typical batches of 10–50 images, the browser-based tool is faster to set up.
How to tell if compression has gone too far
The telltale signs of over-compressed JPGs:
- Blocking: Visible 8×8 pixel squares in smooth gradient areas (skies, skin tones, backgrounds)
- Ringing: Halos or ghost edges around sharp lines and text — a blurry border around high-contrast edges
- Smearing: Fine texture detail (fabric, grass, hair) looks mushed together rather than crisp
- Colour banding: Smooth colour gradients show visible steps between colours instead of smooth transitions
If you see any of these at 100% zoom on the compressed image, increase the quality setting. For web display at typical screen resolutions (1–2× pixel density), minor artefacts visible at 100% zoom are often invisible at actual display size.
Compress your images free — no signup, no watermarks
Reduce JPG, PNG, and WEBP file sizes with smart compression. Batch processing supported.
Compress images freeFrequently asked questions
What JPG quality setting should I use for web images?
For web use, a JPG quality setting of 75–85% produces images that are visually indistinguishable from the original at normal viewing sizes while reducing file size by 50–70%. Only go above 85% if you need the image to hold up at very large display sizes or for print.
What is the difference between lossy and lossless compression?
Lossy compression permanently removes image data to achieve smaller file sizes — JPG uses this approach. Lossless compression reorganises and encodes data more efficiently without removing anything — PNG and lossless WEBP use this approach. Lossless compression produces larger files but perfectly preserves every pixel.
Should I use JPG or WEBP for web images?
WEBP is the better choice for web images when browser support isn't a concern. WEBP achieves 25–35% smaller file sizes than JPG at equivalent visual quality. All modern browsers support WEBP. Use JPG when you need maximum compatibility with older systems or when uploading to platforms that don't accept WEBP.
Can I compress a PNG without losing transparency?
Yes. PNG lossless compression reduces file size by 20–40% without affecting the transparency channel or any pixel data. Tools that compress PNGs losslessly are completely safe for logos and graphics with transparent backgrounds.
How do I know if my image has been compressed too aggressively?
Signs of over-compression in JPGs include blocky patches of colour (especially in smooth gradients and skies), ringing artefacts around sharp edges (halos), and a muddy or smeared look in detailed areas like hair or fabric texture. If you see these at normal viewing size, increase the quality setting.