【发布时间】:2023-02-01 20:04:13
【问题描述】:
我不明白为什么在生产环境中找不到静态图像,但可以在本地主机上使用。我把我所有的图片都放在目录中:public/images/...
/* image.tsx */
return (
<Image
src={"/images/frame1.png"}
width="1000"
height="1000"
alt="Control description"
style={{
height: "auto",
maxWidth: "100%",
userSelect: "none",
}}
/>
)
/* next.config.js */
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
};
module.exports = nextConfig;
【问题讨论】:
标签: next.js nextjs-image cloudflare-pages nextjs13