유저 빡치게 하는 법 = 이미지 무한 로딩시키기
build
시 이미지를 최적화 하는게 아니라, 사용자의 요청이 있을때 on-demand
로 이미지를 최적화한다. (기본이 Lazy loading)Lazy loading
: viewport에 들어오기 전까지 이미지의 로딩을 지연시키는 것import Image from 'next/image'
import profilePic from '../public/me.png'
<Image
src="/me.png"
alt="Picture of the author"
width={500}
height={500}
/>
이런식으로 next에서 제공하는 Image Component를 이용하면 손쉽게 resizing과 optimizing이 가능하다! 완전 신기...
제공하는 모든 props는 여기에서 확인.