Question presented to candidate:
"After upgrading to Next.js 16, some of our images return 400, thumbnails look slightly different, and our image CDN bill went down. What changed in the next/image defaults, why, and how would you restore old behaviour where you really need it?"
What a strong answer should cover:
images.qualitiesnow defaults to[75]: otherqualityprops are coerced to the closest allowed value, and direct/_next/imagerequests with anotherqreturn 400.16was removed fromimages.imageSizes;w=16returns 400 unless you add it back.minimumCacheTTLwent from 60 seconds to 4 hours (14400) to cut revalidation cost for images without cache headers.- Local images with query strings need
images.localPatternswith asearchvalue; remote images resolving to private IPs are blocked unlessdangerouslyAllowLocalIP: true(an SSRF trade-off);maximumRedirectsdefaults to 3. priorityis deprecated in favour ofpreload(orloading="eager"/fetchPriority="high");images.domainsandnext/legacy/imageare deprecated.
Clarifying questions expected:
- "Do we request
/_next/imageURLs directly, for example from emails or a CMS?" β those break first. - "Do any images come from internal hosts or need several qualities?" β that decides the opt-ins.
Code / implementation expected: Yes β a next.config.ts images block that re-enables what the app needs.