Configuration
Image remotePatterns
Restrict eligible image sources with protocol, hostname, port, path and exact search. An empty search disallows a query. Redirect targets are not necessarily constrained by remotePatterns; for a no-redirect source policy disable following redirects. Keep local-network access disabled and verify deployment protections. Source: https://nextjs.org/docs/app/api-reference/components/image. Documentation-reviewed illustrative draft; installed declarations and runtime not verified.
Formal Syntax & Structure
nextjs syntaxnextjs
images: { remotePatterns: [...] }Working Example
Example Snippetnextjs
import type { NextConfig } from 'next';const config: NextConfig={images:{remotePatterns:[{protocol:'https',hostname:'covers.example.com',port:'',pathname:'/catalog/**',search:''}],maximumRedirects:0,dangerouslyAllowLocalIP:false}};export default config;