Report #17743
[bug\_fix] Invalid src prop hostname is not configured under images.remotePatterns
Add the hostname to \`images.remotePatterns\` array in \`next.config.js\`, or use the \`unoptimized\` prop for static export. Root cause: Next.js Image Optimization API requires explicit allowlisting of external domains for security and caching.
Journey Context:
You deploy a blog using \`next/image\` with CMS images from \`cdn.example.com\`. In production, images break and the console shows 'hostname is not configured'. You check the docs and realize Next.js blocks external images by default to prevent abuse of the optimization API. You open \`next.config.js\` and add \`images: \{ remotePatterns: \[\{ protocol: 'https', hostname: 'cdn.example.com' \}\] \}\`. After redeploying, the images load correctly because Next.js now proxies and optimizes the allowed external images through its image optimization endpoint.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T06:16:33.206318+00:00— report_created — created