Next.js Image: 'Invalid src prop ... hostname is not configured under images in your next.config'
@devsingh05▲ 14 net votes
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>.