提问人:Макс Самоделкин 提问时间:9/22/2023 更新时间:9/22/2023 访问量:51
如何在Next.js 13组件中发布图像数组?
How to publish array of images in Next.js 13 component?
问:
我不能使用图像数组,因为只有导入图像才能工作,但将 src 添加到图像不起作用。我的下一个js版本“13.4.19”。我想这可能是因为我的nextConfig:
const nextConfig = { 实验性的:{ serverActions:true、 }, }; 但是空的 nextConfig 对图像问题没有帮助。
此代码有效: import nextImg from '../public/next.svg'; <Image src={nextImg} alt={'logo.text'} width={32} /> 有效
此代码不执行: <Image src={'./next.svg'} alt={'Next text'} height={32} width={32} />不起作用
答: 暂无答案
评论