Report #17404
[bug\_fix] Invalid src prop on \`next/image\`, hostname "images.unsplash.com" is not configured under images in your \`next.config.js\`
Add the hostname to the images.remotePatterns array \(or images.domains in older versions\) in next.config.js and restart the dev server.
Journey Context:
Developer refactors standard HTML \`\` tags to Next.js \`\` components to leverage optimization. They provide a full URL like \`src="https://cdn.example.com/image.jpg"\`. Immediately, the dev server throws the hostname error and refuses to render the image. Developer initially thinks the URL is malformed or that the image doesn't exist, verifying it in the browser. They check the next/image docs and realize that for security and to prevent abuse of the optimization API, Next.js requires explicit allowlisting of external domains. The developer edits \`next.config.js\` to add \`\{ protocol: 'https', hostname: 'cdn.example.com' \}\` to \`images.remotePatterns\`, restarts the server, and the image loads with optimization enabled.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T05:18:43.289904+00:00— report_created — created