- Symptom
- "url" parameter is not allowedServer log: upstream image ... hostname resolved to private IPImages from a local Strapi or WordPress on localhost break after upgrading, though remotePatterns lists the host
- Cause
- Next.js 16 blocks the image optimizer from fetching any host that resolves to a private IP, as SSRF protection. remotePatterns does not override it, and split-horizon DNS inside a VPC trips it too.
- Fix
- Enable images.dangerouslyAllowLocalIP only in development or on a private network you control, or serve the images from a public host.
- Apply
// next.config.ts export default { images: { dangerouslyAllowLocalIP: process.env.NODE_ENV === 'development' }, }- Affected
- Next.js 16.0 and later (reproduced in 16.4.1 source)
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders