Report #14938
[bug\_fix] Invalid src prop ... hostname is not configured under images.remotePatterns
Add the external image domain to images.remotePatterns \(or images.domains for older versions\) in next.config.js, specifying protocol and hostname.
Journey Context:
Developer attempts to use the Next.js Image component with a URL from Cloudinary or AWS S3, e.g., \`src="https://cdn.example.com/image.jpg"\`. The dev server immediately throws an error stating the hostname is not configured. Developer tries to bypass by using a standard \`\` tag, which works but loses optimization benefits. They check the error link and realize Next.js requires explicit allowlisting of external domains for security and optimization. They navigate to \`next.config.js\` and add \`images: \{ remotePatterns: \[\{ protocol: 'https', hostname: 'cdn.example.com', port: '', pathname: '/\*\*' \}\] \}\`, restart the server, and the Image component renders with optimization enabled.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T22:47:25.551920+00:00— report_created — created