Why does next/image refuse my CMS image with 'hostname is not configured'? #31
Answered
by
Kevinchamplin
Kevinchamplin
asked this question in
Q&A
-
|
Why does next/image refuse my CMS image with 'hostname is not configured'? |
Beta Was this translation helpful? Give feedback.
Answered by
Kevinchamplin
Jun 13, 2026
Replies: 1 comment
-
|
next/image only optimizes images from allow-listed hosts. Add the CMS host to images.remotePatterns in next.config.js with protocol + hostname (host only, no URL/port) and a scoped pathname like /wp-content/uploads/**. Prefer remotePatterns over the legacy domains array, and restart next dev since the config isn't hot-reloaded. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kevinchamplin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
next/image only optimizes images from allow-listed hosts. Add the CMS host to images.remotePatterns in next.config.js with protocol + hostname (host only, no URL/port) and a scoped pathname like /wp-content/uploads/**. Prefer remotePatterns over the legacy domains array, and restart next dev since the config isn't hot-reloaded.