Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Next.js Js映像组件不在本地主机上加载映像_Next.js_Nextjs Image - Fatal编程技术网

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域