Report #48042
[bug\_fix] Invalid src prop on \`next/image\`, hostname is not configured under images in your \`next.config.js\`
Add the external image domain to the images.remotePatterns \(or legacy images.domains\) array in next.config.js, then restart the dev server.
Journey Context:
Developer migrates from a standard img tag to next/Image for performance optimization, pointing the src to an external CMS like Contentful or Sanity. On saving the file, the Next.js dev server crashes with an error about the hostname not being configured. The developer checks the Image component props, thinking they missed a required attribute. After reading the error message carefully, they realize Next.js requires allowlisting external domains for security and optimization purposes. They open next.config.js, add the CMS domain to the images.remotePatterns config, restart the server, and the image loads with Next.js optimization enabled.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:07:00.150421+00:00— report_created — created