next.js
8d415853 - [Breaking] feat(next/image)!: add support for `images.dangerouslyAllowLocalIP` and `images.maximumRedirects` (#84676)

Commit
74 days ago
[Breaking] feat(next/image)!: add support for `images.dangerouslyAllowLocalIP` and `images.maximumRedirects` (#84676) This PR adds a two new options and sets a strict default value for each. - `images.dangerouslyAllowLocalIP` - `images.maximumRedirects` ### dangerouslyAllowLocalIP In rare cases when self-hosting Next.js on a private network, you may want to allow optimizing images from local IP addresses on the same network. However, this is not recommended for most users so the default is `false`. > [!NOTE] > BREAKING CHANGE: This change is breaking for those who self-hosting Next.js on a private network and want to allow optimizing images from local IP addresses on the same network. In those cases, you can still enable the config. ### maximumRedirects Since are also testing redirects for local IPs, we can also reduce the maximum number of redirects to 3 by default. Unlike normal websites which might redirect for features like auth, its unusual to have more than 3 redirects for an image. In some rare cases, developers may need to increase this value or set to `0` to disable redirects. > [!NOTE] > BREAKING CHANGE: This change is breaking for those who need image optimization to follow more than 3 redirects.
Author
Parents
Loading