← All errors · Next.js
Invalid src prop on next/image, hostname is not configured
Exact error
Error: Invalid src prop (https://example.com/a.png) on `next/image`, hostname "example.com" is not configured under images in your `next.config.js`
What it means
next/image only optimizes remote images from hosts you explicitly allow.
Likely causes
- Loading an image from a new domain (e.g. Supabase Storage, a CDN) without allow-listing it.
How to fix it
Add the host to remotePatterns in next.config:
// next.config.js module.exports = { images: { remotePatterns: [ { protocol: 'https', hostname: 'example.com' }, { protocol: 'https', hostname: '*.supabase.co' }, ], }, };Restart the dev server. next.config changes are not hot-reloaded.
Related errors
Get new fixes weekly
No spam. Unsubscribe anytime. Privacy