Course contentsShow
← Web Development
Lesson 2004 of 2,98237. Image and Asset OptimizationFree lesson

Quality Settings and Visual Perception

Finding the optimal quality-to-filesize ratio and understanding how humans perceive compression artifacts.

Quality Settings and Visual Perception

You'll learn how to balance image file size and visual quality by understanding how the human eye perceives compression artifacts.

The Human Eye as Your Guide

When compressing images, you're making a trade-off: smaller file sizes mean faster load times, but too much compression creates visible artifacts (blurriness, blockiness, color banding). The key insight? Humans can't perceive all compression losses equally. Your goal is to find the "sweet spot" where file size drops significantly but quality degradation remains imperceptible to most viewers.

Finding the Optimal Quality Setting

Different formats have different quality scales:

  • JPEG: Quality settings typically range from 0-100. The magic zone is usually 75-85 — going from 100 to 85 can cut file size by 50% or more with minimal visible difference.
  • WebP/AVIF: Modern formats are more efficient, so you can often use 80-85 quality and achieve better results than JPEG at 90.
  • PNG: Lossless by default, but you can use tools to reduce the color palette (lossy compression) without noticeable quality loss for non-photographic images.

What Humans Notice (and Don't)

The human visual system is:

  • Less sensitive to subtle color variations in complex areas (textures, patterns)
  • More sensitive to changes in faces, text, and high-contrast edges
  • Less perceptive on mobile screens (smaller display = more forgiveness)

Think of it like audio compression: you can't hear every frequency removed from an MP3, but you know when it sounds "off." Images work similarly.

Testing Your Settings

Always compare compressed images at actual display size on target devices. Zooming in 400% isn't how users experience your site. Test with real content and real viewing conditions.

Key Takeaway: The optimal quality setting is the lowest value where artifacts remain invisible to your target audience — typically 75-85 for JPEG, yielding massive file size savings without perceptible quality loss.