You have a website that loads slowly, an email that bounces because the attachment is too large, or a portfolio that eats through your hosting bandwidth. The problem is almost always images. A single photo from a modern phone camera is 4-8 MB. A batch of 20 product photos can be 100 MB or more.
The good news is that most images carry far more data than the human eye can detect. A well-compressed JPEG can be 70% smaller than the original with no visible difference at normal viewing sizes. The trick is knowing which settings to use and which format to pick.
This guide covers practical image compression for people who need smaller files without sacrificing the visual quality that matters. No theory-heavy deep dives into codec algorithms. Just the settings, formats, and tools that work.
Lossy vs Lossless Compression: What Actually Matters
There are two types of image compression, and the names are self-explanatory.
Lossless compression reduces file size without removing any data. The decompressed image is pixel-for-pixel identical to the original. PNG uses lossless compression. So does WebP in lossless mode. Typical savings: 10-30% smaller files.
Lossy compression removes data that humans are unlikely to notice. JPEG is the classic example. It discards subtle color variations and fine details that most people cannot see at normal viewing distances. Typical savings: 60-85% smaller files.
For most practical use cases, lossy compression at quality 75-85 is the sweet spot. The file size reduction is dramatic, and the quality difference is invisible unless you zoom in to 200% and compare side by side.
When does lossless matter? Screenshots with text, logos with sharp edges, technical diagrams, and any image where you need to preserve exact pixel data (medical imaging, print prepress). For everything else, lossy wins on the file size to quality tradeoff.
The Image Compressor lets you try both approaches. Upload your image, adjust the quality slider, and compare the output against the original. The preview shows you exactly what you lose at each quality level.

Which Format Should You Use in 2026?
The format you choose matters as much as the compression settings.
WebP is the default recommendation for the web. It produces files 25-35% smaller than JPEG at equivalent quality, supports transparency (unlike JPEG), and works in every modern browser. If your audience is on current browsers, use WebP.
AVIF is the newer option with even better compression, typically 30-50% smaller than JPEG. Browser support is now solid across Chrome, Firefox, Safari, and Edge. The downside is that encoding AVIF is slower, which matters for batch processing but not for one-off conversions.
JPEG remains the safe fallback. Universal support, fast encoding, and good enough compression for most photos. Use JPEG when you need maximum compatibility or when your CMS does not support WebP.
PNG is for images that need transparency or pixel-perfect reproduction. Do not use PNG for photographs. A photo saved as PNG is typically 5-10x larger than the same image as a JPEG with no visible quality advantage.
Use the Image Converter to switch between formats. Convert a JPEG to WebP and compare the file sizes. You will likely see a 25-30% reduction with identical visual quality.
The format you choose matters as much as the compression settings.
The Quality Slider: What Each Setting Actually Does
Every image compression tool has a quality slider, usually from 0 to 100. Here is what happens at different ranges:
Quality 95-100: Nearly lossless. File size is only slightly smaller than the original. Useful for archival copies, not for the web.
Quality 80-90: The sweet spot for high-quality web images. Product photos, portfolio images, and hero banners look great at this range. File sizes are 50-65% smaller than the original.
Quality 60-75: Good for thumbnails, blog images, and social media. Most viewers will not notice the compression. File sizes are 70-85% smaller.
Quality 30-50: Visible artifacts appear, especially around text and sharp edges. Only use this for tiny thumbnails or placeholder images where quality does not matter.
Quality below 30: The image becomes noticeably degraded. Colors blend together, text becomes unreadable, and JPEG blocking artifacts are obvious.
A practical workflow: start at quality 80. Check the output. If the file is still too large, drop to 70 and check again. Keep going until you find the lowest quality where the image still looks acceptable for its intended use.
The Image Compressor shows the file size at each quality level in real time, so you can find that balance quickly.
Batch Compression: Handling Dozens of Images at Once
When you have 20, 50, or 200 images to compress, doing them one at a time is not realistic. Batch processing saves hours.
The approach depends on what you are working with:
Product photography (e-commerce, catalogs): Compress all images to the same quality (75-80) and resize to your maximum display size. If your product grid shows images at 600x600 pixels, there is no reason to serve 3000x3000 originals. Resize first, then compress.
Blog content: A mix of screenshots and photos. Screenshots with text should stay at quality 85+ to keep text sharp. Photos can go lower, around 70-75.
Social media assets: Each platform has its own recommended dimensions and file size limits. Compress after resizing to the platform-specific dimensions.
The Image Resizer handles the resize step. Set your target dimensions, choose whether to crop or fit, and process the batch. Then run the resized images through the compressor for maximum file size reduction.
The order matters: always resize before compressing. Compressing a 4000px image and then resizing it to 800px means the compressor wasted effort on pixels you are going to throw away.

Responsive Images: Serving the Right Size to Every Device
Compression alone is not enough if you are serving a 2400px hero image to a phone with a 375px-wide screen. Modern web development uses responsive images to send different sizes to different devices.
The HTML srcset attribute lets browsers choose the right image:
`html
`
This tells the browser: on small screens, load the 400px version. On medium screens, 800px. On large screens, 1200px. Each version is separately compressed at the optimal quality for its size.
The preparation workflow is:
- Start with the highest resolution original
- Create 3-4 size variants using the Image Resizer (common breakpoints: 400, 800, 1200, 1600 pixels wide)
- Compress each variant with the Image Compressor at quality 75-80
- Convert to WebP using the Image Converter
- Add the
srcsetmarkup to your HTML
This combination of responsive sizing and compression can reduce the total data transferred to mobile users by 80-90% compared to serving a single large image.
Common Mistakes That Undo Your Compression Work
Re-compressing already compressed images. Every time you save a JPEG as JPEG, it loses more quality. If you need to edit an image, go back to the original file, make your changes, and export once at your target quality. Never compress, edit, and compress again.
Using PNG for photographs. PNG was designed for graphics with flat colors and sharp edges (logos, icons, screenshots). Photographs in PNG are enormous. Convert them to JPEG or WebP.
Ignoring metadata. Camera files include EXIF data: GPS coordinates, camera settings, timestamps. This metadata adds 10-50 KB per image. For web use, strip it. Most compression tools do this automatically, but check your settings.
Not resizing before compressing. A 4000x3000 photo compressed at quality 70 is still much larger than an 800x600 photo compressed at quality 85. Resize to your maximum display size first.
Using the wrong quality for the wrong content. Text-heavy screenshots need higher quality (85+) because compression artifacts are most visible around sharp edges. Landscape photos with soft gradients can go as low as 60-65 without noticeable degradation.
**Re-compressing already compressed images.** Every time you save a JPEG as JPEG, it loses more quality.
FAQ
Does compressing an image remove the background?
No. Compression reduces file size by removing invisible data, not visible content. The background stays exactly where it is. If you want to remove a background, you need a background removal tool, not a compressor.
Can I compress a PNG without converting it to JPEG?
Yes. PNG has its own lossless compression that can reduce file sizes by 10-30%. Tools like pngquant also offer lossy PNG compression that reduces colors from millions to 256, which works well for graphics but not for photographs.
How much compression is too much?
It depends on the use case. For a full-screen hero image, quality below 70 may show visible artifacts. For a 100x100 thumbnail, quality 50 is often fine. The rule of thumb: if you can see compression artifacts at the size the image will actually be displayed, you have gone too far.
Will compressed images look bad on retina displays?
Retina displays have 2x or 3x pixel density, so they show more detail. Serve images at 2x the display size (a 400px slot gets an 800px image) to keep them sharp on retina screens. The larger file is still much smaller than an uncompressed original.
What is the difference between image compression and image resizing?
Resizing changes the pixel dimensions of an image (making it smaller or larger). Compression reduces the file size without changing dimensions, by removing data the eye cannot detect. For the biggest file size savings, do both: resize to your target dimensions, then compress.
CSS Layout Tools: Grid, Flexbox, Gradients and Shadows
A practical guide to CSS Grid, Flexbox, gradients, and box shadows. Learn when to use each technique and how to generate CSS code quickly.
Edit Images in Your Browser: Resize, Compress, Convert, and Extract Metadata
Learn how to handle common image editing tasks directly in your browser without installing software - resize, compress, convert formats, and inspect metadata.
CSS Generators for Modern Web Design: Gradients, Flexbox, Grid, and Shadows
Learn how to use CSS generators to quickly create gradients, flexbox layouts, grid systems, and box shadows - with the CSS code ready to copy into your project.
