Next.js · Junior · Question 19 of 75
Why does <Image src="https://cdn.example.com/a.jpg" ... /> produce a configuration error?
- ✓Correct answer: External domains must be allowed in
images.remotePatternsinnext.config - 2
next/imagedoesn't support images from other domains at all - 3External images can be loaded only in PNG format
Explanation
The image optimizer runs on your server, and without restrictions it could be used as a proxy for any URL. That's why allowed sources are listed in remotePatterns (protocol, host, path).