Next.js Js映像组件不在本地主机上加载映像
我已经在Next.js Js映像组件不在本地主机上加载映像,next.js,nextjs-image,Next.js,Nextjs Image,我已经在next.config.js上设置了图像域,但是图像没有显示在localhost上。然而,当代码被推送到生产环境时,图像被加载到vercel上 在localhost上,我看到下面的图片。图像不加载 在制作过程中,可以看到图像 我应该怎么做才能看到发展的图像 module.exports = { images: { domains: [ 'd31wtm2rx76rut.cloudfront.net'], }, } 在本地运行应用程序时,图像是否使用与
next.config.js
上设置了图像域,但是图像没有显示在localhost上。然而,当代码被推送到生产环境时,图像被加载到vercel上
在localhost上,我看到下面的图片。图像不加载
在制作过程中,可以看到图像
我应该怎么做才能看到发展的图像
module.exports = {
images: {
domains: [ 'd31wtm2rx76rut.cloudfront.net'],
},
}
在本地运行应用程序时,图像是否使用与生产中相同的URL域(d31wtm2rx76rut.cloudfront.net
)?是的,图像使用相同的URL域