我在 Next 14 中收到以下警告:
“images.domains”配置已弃用。请改用“images.remotePatterns”配置。
我的 next.config.js 有这个
images: {
domains: ['res.cloudinary.com'],
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
}
Run Code Online (Sandbox Code Playgroud)
如果我从那里删除域,则会收到错误:
`next/image`,主机名“res.cloudinary.com”未在“next.config.js”中的图像下配置