When attempting to fetch images from a CDN, an error stating "hostname **** is not configured under images in your next.config.js
" was encountered. Despite following the configuration guidelines provided on the official Next website, the issue persists.
// next.config.js
module.exports = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'assets.example.com',
port: '',
pathname: '/**',
},
],
},
}
The current version of Next being used is 12.3.1. How can I resolve this issue and successfully retrieve the desired image?