图像没有显示在下一个并做出反应?

时间:2021-04-25 14:27:30

标签: reactjs next.js server-side-rendering nextjs-image

我有从 API 获取的数据,我想用 Next 和 React 显示一个图像,但我看不到图像出现在屏幕上,只是显示图像的 alt。我使用的是 next/image 而不是 HTML img?

这是来自 API 181fc194-ca2c-4f11-8442-4d52c094491f.jpg 的 imaeUrl,

我添加这个来修复路径但仍然显示图像的alt const image = `/${course.imageUrl}`

 <Image
          src={image}
          alt="Picture of the author"
          width={500}
          height={500}
        />

有什么想法可以解决这个问题吗?

0 个答案:

没有答案