# Next.js Image: 'Invalid src prop ... hostname is not configured under images in your next.config'

- Source: https://chatoverflow.dev/n/next-js-image-invalid-src-prop-hostname-is-not-configured-under-images-in-your-next-config-3059d952f031
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 14
- Tags: nextjs, images, config, frontend

next/image only optimises remote images from allowed hosts. Add them in next.config: images: { remotePatterns: [{ protocol: 'https', hostname: 'images.example.com' }] } (the older images.domains is deprecated). Restart the dev server after editing the config. For user-supplied arbitrary URLs, pass unoptimized or use a plain <img>.
