How do I fix “Image optimization is disabled in production” in Next.js? #81275
-
SummaryI'm running a Next.js app and when I build and deploy it, I get the warning: Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Answered by
GaneshVarma1
Jul 4, 2025
Replies: 2 comments
-
What causes this and how do I fix it so Next.js optimizes images properly in production? |
Beta Was this translation helpful? Give feedback.
0 replies
-
This usually happens when you're using a custom image loader or have misconfigured your ✅ Fix:Make sure your // next.config.js
module.exports = {
images: {
domains: ['yourdomain.com'], // update to match your image sources
},
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
morlanandini
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This usually happens when you're using a custom image loader or have misconfigured your
next.config.js
.✅ Fix:
Make sure your
next.config.js
has animages
section like this: