Next.js · sdk · fg-0305

next/image returns 400 '"url" parameter is not allowed' for a localhost or private-network image source

If you see "url" parameter is not allowed, the cause and the fix for Next.js are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
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

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun