Ch. 20 · Optimizing Web Images and Animations

한국어日本語
7 min

Wrap-up and Checklist: Audit Your Site's Images in One Pass

We bundle the procedure of checking format → size → fallback → loading → accessibility into one table. Since this site hasn't measured images, the takeaway is the habit of checking the numbers yourself.

The conclusion of this chapter is the same as the video chapters. Just as the encoding recipes chapter said 'the numbers differ from video to video', for images too you convert your own images and pick based on what you see. The last lesson bundles that procedure into a checklist.

A 5-step check

  1. 1Sort by type. Is it a photo, line/text-centered, does it need transparency, or does it move (the table in the first lesson).
  2. 2Convert from the original. Don't repeatedly convert an already-lossy JPEG; whenever possible, make each format and size from the original.
  3. 3Check the display width and decide sizes. Start with three or four srcset candidates based on the maximum width actually rendered (picture and srcset).
  4. 4Keep a fallback. The most widely supported JPEG, PNG, or H.264 MP4 should always be last. Check support with public data, with the date attached (checking support).
  5. 5Verify with your eyes and numbers. Look at file size and quality together (zooming in by eye), and check on both large and small screens.
What to checkHowLesson in this chapter
Does the format match the image type?Photo = lossy, logo/UI = lossless or SVG1
Did you write down the date for support status?Public data like caniuse and MDN, your own tests2
Are you sending big files to phones?srcset and sizes, check the network at 360px width3
Does the layout shift?width and height on img3
Did you convert from the original?cwebp, avifenc, cjxl, and ffmpeg commands4
Is the moving image a GIF?Convert to MP4/WebM and compare5
Checking with the browser's developer tools

In the Network tab of the developer tools in Chrome, Firefox, and others, looking at the image requests shows which file actually came down, in what format and size. Narrow the width to 360px and reload to check that a small file is chosen on a small screen. This is the most direct evidence that <picture> is written correctly.

The evidence and limits used in this chapter

  • This chapter has no numbers that this site measured with images. The measurement articles are based on video codecs, and we did not directly measure the size or quality of image formats, GIF, or WebM.
  • The claim that AVIF is 40–50% smaller than JPEG on average is a general 'is known to' statement like the one in Chapter 4, not a value this site vouches for.
  • Browser support had parts where sources disagreed as of the reference date (2026-11-11), especially for JPEG XL, and this chapter does not include a table.
  • The conversion command options come from the general usage in each tool's official documentation, and the quality numbers (70, 80, CRF 23, etc.) are just starting-point examples, not recommended values.

For video conversion, you can build commands with the FFmpeg command builder, and you can check the codec and resolution of a converted video file with the video file info inspector.

One-line summary of this chapter

Pick the format by type, pick the size by screen, solve support with a fallback, and confirm the final numbers with your own images.

Responsive imagesResponsive images

Serving different image files depending on screen size, pixel ratio, and supported formats. Built from picture, srcset, and sizes.

Network tabNetwork tab

The view in browser developer tools that shows the format, size, and timing of the files a page requested.

Check yourself

Which is closest to the checking order this chapter proposed?

Check yourself

What is the most direct way to check that <picture> works as intended?