How to allow a remote icon CDN with Next Image
Answer in brief
Configure remotePatterns to match the expected source URL and path. Check the protocol, hostname, port, pathname and query behavior when an otherwise valid image is rejected.
Match one collection prefix
If thumbnails live under https://cdn.example.com/icons/, match the HTTPS host and the /icons/** pathname. Test a real thumbnail from that prefix after restarting the app, including any query used by the CDN.
Diagnose a rejected URL one component at a time
Copy the underlying remote source URL, then compare its scheme, hostname and pathname with the configured pattern. Staging often uses a different subdomain or path prefix. Add a narrowly scoped staging entry when needed and verify that an unrelated path on the same host remains outside the rule.
Sources
- [1] Image Component — Next.js, accessed November 23, 2026
Frequently asked questions
Why do signed thumbnail URLs still fail?
Review the pattern's search field. An empty search requires a URL without a query string, which can exclude signed URLs.