Image

未匹配的标注

优点

  • 自动调整图片尺寸
  • 懒加载
  • 提供模糊图片
  • 防止图片位移

范例

import Image from 'next/image';

const YourComponent = () => (
  <Image
    src="/images/profile.jpg"
    height={144} 
    width={144}
    alt="Your Name"
  />
);

基础

import Image from 'next/image'
# 更接近原生 img
import Image from 'next/future/image'

本文章首发在 LearnKu.com 网站上。

上一篇 下一篇
讨论数量: 0
发起讨论 查看所有版本


暂无话题~