Next.js Image: hostname is not configured under images — repair
Next/image component may refuse to display graphics from the external domain if the source does not match the allowed patterns. It's a separate problem since CSS clipping a photo or an inaccessible file.
How to Recognize Cause
In the browser console or log Next.js read the exact hostname and URL of problematic graphics. Compare them with images.remotePatterns in next.config.ts or next.config.js. Note protocol, path and query parameters.
See if the original image opens directly. If the image server corresponds to 403 or requires a cookie, simply adding remotePatterns will not fix the external source authorisation.
Step by step solution
1. In next.config.ts add image.remotePatterns entry for a specific, trusted domain and the corresponding file path. Do not allow any host with too wide a wildcard.
2 . Make sure the hostname in the configuration corresponds exactly to the domain with src — including the subdomain. Check separately https and possible port number in the test environment.
3 . If the image has URL parameters, check the search properties match in the pattern. The empty value may exclude all addresses from the query string.
4 . After saving the configuration, restart the developer server or execute a new implementation. The next.config change does not have to apply immediately in the already running process.
5 . If the message is still present, check the endpoint / next/image response and HTTP code. Distinguish 400 due to pattern matching from source server error.
How to see if the problem is gone
Graphics should load after hard page refresh, and Network should not show 400 responses to / next/image due to untrusted host.
Also check another external domain that is not trusted: should not accidentally access the image optimizer.
What to do
Do not automatically prescribe every URL from an error to a wide list of wildcards. remotePatterns performs the function of controlling permitted sources.