Report #12874
[bug\_fix] Invalid src prop ... hostname 'images.unsplash.com' is not configured under images in your next.config.js
Add the external hostname to the images.remotePatterns or images.domains array in next.config.js. For example: images: \{ remotePatterns: \[\{ protocol: 'https', hostname: 'images.unsplash.com' \}\] \}. The root cause is that Next.js Image component requires explicit domain whitelisting for external images to prevent abuse of the optimization API and ensure security.
Journey Context:
You copy an image URL from Unsplash into your Next.js app using the component. It displays in development but the build fails with 'hostname is not configured'. You check the error message and realize you need to whitelist the domain. You try adding 'unsplash.com' to domains but the error persists because the actual hostname is 'images.unsplash.com'. You check the Next.js docs for the exact remotePatterns syntax with protocol and hostname fields, update next.config.js, restart the dev server, and the error resolves.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T17:14:03.102305+00:00— report_created — created