【发布时间】:2022-01-04 18:32:06
【问题描述】:
我使用 NextJS 构建站点,图像托管在其他使用 IP 运行的开发服务器上。该文件可通过图像路径公开访问: http://xxx.xx.xxx.xxx:8080/storage/user-profile/61d41e2b05de9_WhatsApp%20Image%202022-01-02%20at%2021.46.03.jpeg 但我收到以下错误: Error Message
我在 next.config.js 中添加了以下代码:
module.exports = {
images: {
domains: ["http://xxx.xx.xxx.xxx:8080"],
},
};
甚至尝试过
module.exports = {
images: {
domains: ["http://xxx.xx.xxx.xxx:8080"],
},
};
两者都返回如上截图所示的相同错误
非常感谢任何帮助
【问题讨论】:
标签: next.js nextjs-image