Next.js · dev overlay
next/image hostname is not configured
Error: Invalid src prop (https://avatars.githubusercontent.com/u/1) on `next/image`, hostname "avatars.githubusercontent.com" is not configured under images in your `next.config.js`What it means
next/image only optimizes remote images from hosts you allow. Avatars from GitHub or Google sign-in, Stripe product images and CMS images all need an entry.
Common causes
- Showing session.user.image from an OAuth provider
- Images from a CMS, S3 bucket or Supabase Storage
How to fix it
- Add the host to images.remotePatterns in next.config.ts
- Be specific (protocol, hostname, path) instead of allowing every host
const nextConfig = {
images: {
remotePatterns: [new URL("https://avatars.githubusercontent.com/**")],
},
};Prompt for Cursor or Claude Code
next/image rejects a remote hostname. Add a specific images.remotePatterns entry in next.config.ts for this host (protocol, hostname and a path pattern if possible). Don't allow all hosts.Not quite your error? Paste yours into the free VibeBoot Doctor or browse the Next.js error fixer.
next: skip the next one
Skip the setup. The VibeBoot SaaS Starter gives you auth, Stripe and a database already wired on Next.js 16.4.3, with AGENTS.md and .cursor/rules that keep your agent on the Next.js 16 conventions. $49, one-time.
14-day money-back guarantee · lifetime updates
Other Next.js errors
- useState / useEffect in a Server Component
- Event handlers cannot be passed to Client Component props
- Functions cannot be passed directly to Client Components
- Only plain objects can be passed to Client Components
- "use client" must be placed before other expressions
- export "metadata" from a "use client" page
$ fixed it? get the next one first
New fixes for what AI agents break, by email.
When we add a fix or a Cursor rule for a new Next.js, Auth.js, Prisma or Stripe break, it goes out in the VibeBoot newsletter. Free, occasional, unsubscribe in one click.