Images are responsible for more slow web pages than any other factor. Not bad hosting, not unoptimized JavaScript — images. HTTP Archive's data consistently shows that images account for the majority of bytes on a typical web page, and most of those images are dramatically larger than they need to be.

The good news is that this is one of the easiest wins in web performance. You don't need to change your architecture, touch your server config, or refactor anything. You just need to know what you're doing with compression settings.

Lossy vs Lossless — Why Both Exist§

The two fundamentally different approaches to image compression serve different needs.

Lossless compression reduces file size without discarding any pixel data. The image can be reconstructed perfectly from the compressed file. It works by finding and encoding repeating patterns more efficiently — PNG uses the same DEFLATE algorithm as ZIP files. The result is smaller than uncompressed, but larger than what's achievable with lossy compression.

Typical lossless reduction: 10–40% from uncompressed. No quality loss whatsoever. Right choice for: PNG files, logos, icons, screenshots, UI elements.

Lossy compression permanently discards pixel information. The discarded data is chosen strategically — JPEG's DCT (Discrete Cosine Transform) throws away fine detail and high-frequency information first, because human vision is least sensitive to those. At a good quality setting, the result looks identical to the original. At a poor setting, you get the blocky artifacts that make JPEG get a bad reputation.

Typical lossy reduction: 60–90% from uncompressed. Quality depends entirely on the setting used. Right choice for: photographs, hero images, anything where visual quality can flex a little.

The choice between them isn't really a competition. They're for different content types.

JPEG Quality Settings — The Numbers That Actually Matter§

The JPEG quality scale runs from 1 to 100, but the relationship between quality and file size is not linear. And this is where a lot of people make poor decisions in both directions — either keeping quality too high and serving enormous files, or dropping it too low and producing visibly degraded images.

Here's what the numbers actually mean in practice:

Quality Approximate size vs max Notes
95–100 100% For master files and print. Overkill for web.
85–90 ~40% Excellent quality. Safe for product photos, galleries.
75–85 ~25% Web standard. Looks great at normal viewing sizes.
60–75 ~15% Artifacts visible on close inspection.
Below 60 <10% Noticeably degraded. Avoid.

The interesting observation here: the "quality cliff" tends to sit around 70–75. Above that threshold, most people genuinely cannot tell the difference between quality 85 and quality 100, even when looking closely. Below 70, most people can see something's off.

For web images, 82–85% is the practical default. You get roughly 60–70% size reduction compared to a lossless source, with no perceptible quality loss under normal viewing conditions.

For WebP — which is more efficient than JPEG at equivalent visual quality — you can go slightly lower. WebP at 78% typically looks comparable to JPEG at 85%, while being 25–30% smaller again.

Next-Generation Formats — Where Things Are Heading§

WebP is now the correct default for web-delivered images. Supported by all modern browsers, 25–35% smaller than JPEG at equivalent quality, supports transparency. The only reason not to use it is compatibility with software that doesn't read it — but for anything served on the web, you don't have that constraint.

AVIF is worth knowing about. It's based on the AV1 video codec and achieves about 50% smaller files than JPEG at equivalent quality — roughly double the efficiency of WebP. Browser support is now at ~95% for modern browsers, though some older Safari versions don't support it. For sites targeting a modern audience, AVIF is the forward-looking choice.

The right pattern for maximum compatibility:

<picture>
 <source srcset="image.avif" type="image/avif">
 <source srcset="image.webp" type="image/webp">
 <img src="image.jpg" alt="Description" loading="lazy">
</picture>

Browsers pick the first source format they support and ignore the rest. This gives modern users the best compression while keeping compatibility for everyone else.

The Most Common Compression Mistakes§

Compressing an already-compressed file. Every round of lossy compression compounds quality loss. If you run an 85% JPEG through a compressor again at 85%, you don't get the same quality as the original — you get an 85% quality image of an 85% quality image. Always compress from the original uncompressed or lossless source.

Using PNG for photographs. Lossless PNG compression of a photographic image produces files that can be 10–20× larger than an equivalent-quality JPEG. PNG is correct for graphics, logos, and screenshots. For photos, use JPEG or WebP.

Ignoring dimensions. A 4000px-wide image served in a 600px container wastes roughly 45× the bandwidth of the appropriately sized image, even at the same compression level. The browser still needs to decode and store the full resolution in memory. Resize before compressing.

Over-compressing logos and text. Lossy artifacts are most visible along sharp edges and high-contrast text. A logo that looks fine as a JPEG at 85% may look terrible at 70%. Use PNG or WebP lossless for logos, icons, and diagrams — or at least use higher quality settings.

A Practical Compression Workflow§

For website images, in order:

  1. Start from the original high-resolution source. Never from an already-compressed version.
  2. Resize to the largest dimension you'll actually display. 1200–1600px wide is typical for most website contexts.
  3. Convert to WebP at quality 80. This is a good default for most photographic content.
  4. Add a JPEG fallback for contexts where WebP isn't supported.
  5. Use loading="lazy" on below-fold images to defer loading until they're needed.

For social media, the platforms apply their own compression after upload, which compounds quality loss. To minimize this: upload at the highest quality the platform accepts, use the platform's preferred format (usually JPEG for photos), and aim for quality 90+ on uploads so there's headroom for their compression to work with.

Compressing in NexaTools§

The NexaTools Compressor processes images locally in your browser — no files are uploaded, no size limits, no accounts. Drag in your image, set the quality level, preview the result side-by-side with the original, and download.

The side-by-side preview is the useful part. Rather than guessing whether quality 82 will look acceptable, you can see it directly before downloading. If it looks identical at 82%, there's no reason to use 95%. If you can see artifacts, bump it up.

For most web images, the workflow is: upload, set to 82, check the preview, download. Thirty seconds. The resulting file is typically 60–70% smaller than the source with no visible quality change.

Quick Reference§

Content type Format Quality
Photographs for web WebP 78–82%
Photographs for print JPEG 95%+
Logos and icons PNG or WebP lossless N/A
Screenshots PNG N/A
Transparent graphics WebP or PNG N/A
Social media uploads JPEG 90%+
Email thumbnails JPEG 70–75%

The bottom line: for photographs headed to a website, convert to WebP at quality 80. You'll get dramatically faster page loads with output that looks identical to the original. The NexaTools Compressor makes this a 30-second job, entirely in your browser.