Report #24876
[bug\_fix] The requested resource isn't a valid image for the src provided.
Add the domain to \`images.remotePatterns\` in next.config.js. Root cause: Next.js Image component requires explicit domain allowlisting for security and optimization purposes.
Journey Context:
You're migrating an existing site to Next.js. You replace \`\` tags with the \`\` component from 'next/image' and point it to your CMS media URL. The image doesn't load and the console shows a 400 error. You check the network tab and see the request was intercepted by Next.js's image optimization API. After checking the error message, you realize Next.js blocks external images by default. You look up the next.config.js documentation and add the domain to the images.domains array \(or remotePatterns in newer versions\). Once configured, the image loads with automatic WebP conversion and lazy loading. This teaches the security model where Next.js acts as a proxy for external images.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:09:42.322348+00:00— report_created — created