Skip to content
All writing Part 03 of 07 · Crop, Resize, Fill: Image Processing
Engineering · 2 min read

Lossy vs Lossless Drives File Size

The biggest driver of image file size is lossy vs lossless, not the extension — lossy shrinks photos, lossless keeps every pixel, and flat graphics flip the rule.

The biggest driver of file size is lossy vs lossless, not the extension. For the same photo (JPEG as the baseline), the rough sizes look like this:

Same photo — relative file size (JPEG = 1× baseline) ◀ smaller larger ▶ AVIF ~0.5× WebP ~0.7× JPEG 1× PNG ~3-10× BMP ~20×+ ■ lossy (AVIF/WebP/JPEG) ■ lossless (PNG) ■ uncompressed (BMP)
Lossy vs lossless is the biggest lever — lossy stays small, lossless keeps every pixel and grows.
  • Lossy (JPEG, WebP, AVIF) discards detail the eye barely notices, so files stay small. Great for photos, bad for sharp text or lines (blurry ringing artifacts).
  • Lossless (PNG, GIF) keeps every pixel, so photos get large, but flat graphics with few colors come out smaller than JPEG (a solid-color logo compresses to almost nothing).
  • Quality knob: JPEG, WebP, and AVIF trade quality for size on a 0 to 100 scale. That’s exactly the knob a “compress until under a size limit” loop tunes.

To make it smaller, first ask whether this image can go lossy, then talk about which format.


References:

Related: Pair this with the image format cheat sheet and ad serving flips the format priority — or go back to the crop, resize, fill overview.

Tags #image-processing #file-formats
// connect

Be brave | Be wise | Be grateful

21 BreakinCode

// elsewhere
LinkedInMedium (lang: en)Life RecordYoutube
wh:~$William Hung· © 2026 Taipei · GMT+8 · Available for collaboration