Next:Error: Image with src “https://via.placeholder.com/50“ is missing required “height“ property.

在 Next.js 中使用 next/image 组件时,需要同时提供 width 和 height 属性,或者使用 fill 属性。你遇到的错误提示表明缺少 height 属性,下面是修正后的代码:

{alt} setIsLoading(false)}
    onError={() => setIsLoading(false)}
/>

 

 

你可能感兴趣的:(前端,SEO,react,前端,mui)