You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/01-app/03-api-reference/02-components/image.mdx
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -837,6 +837,28 @@ module.exports = {
837
837
}
838
838
```
839
839
840
+
#### `maximumResponseBody`
841
+
842
+
The default image optimization loader will fetch source images up to 300 MB in size.
843
+
844
+
```js filename="next.config.js"
845
+
module.exports= {
846
+
images: {
847
+
maximumResponseBody:300_000_000,
848
+
},
849
+
}
850
+
```
851
+
852
+
If you know all your source images are small, you can protect memory constrained servers by reducing this to a smaller value such as 50 MB.
853
+
854
+
```js filename="next.config.js"
855
+
module.exports= {
856
+
images: {
857
+
maximumResponseBody:50_000_000,
858
+
},
859
+
}
860
+
```
861
+
840
862
#### `dangerouslyAllowLocalIP`
841
863
842
864
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. This is not recommended for most users because it could allow malicious users to access content on your internal network.
@@ -1341,6 +1363,7 @@ export default function Home() {
0 commit comments