How to compress images without losing quality (JPG, PNG, WebP in 2026)
The math behind JPG quality, why WebP is now the smarter default, and the settings that give 60% file-size savings with no visible quality loss.
The three levers you can pull
Every image tool exposes the same three variables:
- Format - JPG, PNG, WebP, AVIF (each with different tradeoffs).
- Quality - how aggressively the encoder throws away detail.
- Dimensions - the actual pixel width and height.
Most people fixate on quality when the biggest win is switching format or shrinking dimensions.
Format cheat sheet
- JPG - best for photos. Lossy. Bad at transparency (doesn't have any) and text/edges.
- PNG - best for logos, icons, screenshots with sharp text. Lossless. Terrible for photos (files are massive).
- WebP - 25-35% smaller than JPG at the same visual quality. Handles both lossy (photo) and lossless (logo) modes. Supports transparency. Universal browser support since 2020.
- AVIF - even smaller than WebP (30-50% smaller than JPG) but slow to encode and support is Chromium-heavy. Great for hero images where a few extra encode seconds are acceptable.
- SVG - vector, so it scales infinitely. Only for logos, icons, and diagrams - not for photos.
Default choice in 2026: WebP for everything except icons (SVG) and edge cases where a downstream tool refuses WebP (increasingly rare).
The JPG quality sweet spot
The relationship between JPG quality and file size is not linear. Every popular photo library has independently found the same three thresholds:
- Quality 90+ - visually lossless; huge file. Only worth it for photos that will be printed or archived.
- Quality 75-85 - the sweet spot. No visible loss for 99% of viewers on 99% of screens. Files are typically 40-60% smaller than quality 95.
- Quality 60-75 - visible loss on smooth gradients (skies) but fine for most content photos and thumbnails.
- Below 60 - obvious artifacts. Avoid unless you deliberately want a heavily-compressed look.
Image Compressor defaults to 78 - right in the sweet spot.
The dimensions win nobody talks about
A 4K photo pushed to Instagram gets downscaled by Instagram's servers to a smaller size before display. Uploading the original 4K JPG wastes 90% of the bytes - Instagram just throws them away.
Rule of thumb: image dimensions should match display dimensions ร 2 (for retina). If your website hero displays at 1200ร600, upload a 2400ร1200 image. Anything larger is wasted bandwidth and slower loads.
Image Resizer has presets for every social platform's actual displayed dimensions - Instagram feed (1080ร1080), YouTube thumbnail (1280ร720), Twitter card (1600ร900), etc. Resize once, upload the right size.
The compression workflow that works
Three-step process that gets photos from a phone-camera 8MB down to a web-ready 200KB with no visible quality loss:
- Resize to display dimensions ร 2 with Image Resizer. Biggest single win.
- Convert to WebP at quality 78 with Image Compressor. Second-biggest win.
- Sanity-check the final file - if it's still >500KB for a small image, either the source has ridiculous detail (photograph of leaves) or the format choice is wrong.
Typical result: a 4-6MB phone photo becomes a 150-300KB WebP with no visible quality difference at normal screen viewing.
When PNG is still right
PNG stays the default for:
- Logos and icons with sharp edges - JPG smears edges into artifact halos.
- Screenshots with text - same reason. UI screenshots must be lossless.
- Anything with transparency - until you migrate to WebP.
- Favicons and app icons - Favicon Generator and App Icon Generator both export PNG for exactly this reason.
The one PNG optimization worth knowing: PNG has multiple compression levels, but they're all lossless - level 9 is smaller than level 1 but takes 10ร longer to encode. Most tools default to 6.
For real PNG size wins, convert screenshots and logos to WebP lossless mode - you get PNG-equivalent quality at 40-70% smaller.
The lie about "PNG-24 vs PNG-8"
PNG-8 (indexed 256-color) can be dramatically smaller than PNG-24 (true color) for images with few colors - logos with 3 or 4 solid colors compress incredibly well as PNG-8. Most modern tools (including Image Compressor) don't expose PNG-8 explicitly because the format decision is made per-image. If a logo compresses badly as PNG, try SVG first - it's usually smaller and infinitely scalable.
Batch compression
For large batches (a whole folder of product photos), do the resize step first - the file size wins from resizing dwarf what compression can do. Image Compressor accepts multiple files at once and downloads them individually or as a batch. Everything runs in the browser via the Canvas API - files never upload.
The one thing to remember
If you take one thing from this guide: switch your default from JPG to WebP. Every browser you care about supports it, files are 25-35% smaller at the same quality, and CDNs happily serve it. The 8-year window where "WebP compatibility" was a real concern closed years ago.
Related tools you'll reach for in the same session:
- Image Compressor - the primary tool.
- Image Converter - for format-only changes (PNG โ WebP without resizing).
- Image Resizer - for the dimensions step.
- Placeholder Image Generator - for mockups before real images exist.
- Favicon Generator - the multi-size favicon package.
Tools mentioned in this post
Image Compressor
Compress JPG, PNG, and WebP images with adjustable quality - private, in-browser
Image Converter
Convert between PNG, JPG, and WebP in your browser - batch supported
Image Resizer
Resize images to exact pixel dimensions or percentages - with aspect-ratio lock
Favicon Generator
Upload an image โ get every favicon size, apple-touch, PWA icons, ICO, and the HTML snippet
Placeholder Image
Generate solid-color or gradient placeholder images at any size - download PNG
Related reading
WebP vs JPG in 2026: why WebP won, and when JPG is still right
WebP files are 25-35% smaller than JPG at the same visual quality. Every browser supports it. Every CDN serves it. Here's why the JPG-vs-WebP debate is over - and the two edge cases where JPG still wins.
Canva's AI image generator is the best thing to happen to solo game devs - here's the honest review
I finally sat down with Canva Dream Lab (the one built on Leonardo Phoenix) to make a game logo, and it changed my mind about AI art for indie devs. Here's what it's actually good at, where it falls apart, and the tiny stack of free tools that turns its output into ship-ready assets.
Favicon and app icon complete guide 2026 (every size, every platform)
The favicon.ico that still matters, the apple-touch-icon that isn't optional, the PWA icons that make you installable, and the iOS + Android sets your app needs on day one.
How to blur part of an image online (free, no upload, no watermark)
The safe way to blur a face, license plate, credit card number, or address in a screenshot - with a browser-based blur brush that never uploads your image. Includes the mistakes that make blur reversible, and why pixelation is often the safer choice.
Shan builds 712 Tools. He holds a Master's degree in Mechanical Engineering and now works as a Software Engineer, shipping browser-based developer utilities out of Ontario, Canada. Learn more ยท 712studiogames@gmail.com