Report #16541
[bug\_fix] Invalid src prop ... hostname is not configured under images in your \`next.config.js\`
Add the external hostname to \`images.remotePatterns\` \(or \`images.domains\` in older versions\) in \`next.config.js\`. Root cause: The \`next/image\` Image Optimization API fetches external images at build-time or request-time; for security \(SSRF prevention\), only explicitly allowed hostnames are permitted.
Journey Context:
Developer integrates a CMS and tries to display an image: \`\`. Instead of the image, they get a 400 error in the browser network tab and a console error: 'Invalid src prop... hostname is not configured'. Developer initially thinks it's a broken URL, but the URL works in the browser. They realize Next.js Image component requires whitelisting. They open \`next.config.js\` and add \`images: \{ remotePatterns: \[\{ protocol: 'https', hostname: 'cdn.example.com' \}\] \}\`. After restarting the dev server, the image loads correctly and is optimized by Next.js.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T02:53:15.998089+00:00— report_created — created