Images
After this film you canserve optimized images with next/image.
Exercise
Download the exercise (a zip). Unzip it, read exercise.md, then in exercise/ run npm install and node check.mjs. The checker runs a real build and says PASS or FAIL for each criterion.
Recall
Answer each one out loud before you open it.
Why did the price jump on Bob's phone, and how does next/image stop it?
The photo had no size until its file started to arrive, so the browser made room late and pushed everything below it down. A static import gives <Image> the photo's width and height, so the box is held from the first paint.
Why do the lamp cards need sizes?
CSS makes them narrower than the photo. Without sizes, an imported photo gets a 1x/2x srcset at the photo's own width, so every screen gets that big copy; with sizes, the HTML lists many widths and Bob's phone picks the one it needs.
How do you make the hero photo load first in Next.js 16?
Not with priority, which is deprecated in favour of preload. Give the one image above the fold loading="eager", which the docs suggest in most cases.