FRAMEWORK » NEXTJS » BUILTIN

Image

Usage

js
import Image from 'next/image'
PropDescription
src[Required] A statically imported image file or a path string.
width[Required] Rendered width in pixels. Not required if using fill or statically imported images.
height[Required] Rendered height in pixels. Not required if using fill or statically imported images.
alt[Required] Image description.
fillCauses the image to fill the parent element instead of setting width and height.
priorityEnable image preload.

Examples

html
<Image
  src="/images/profile.jpg"
  className={utilStyles.borderCircle}
  height={144}
  width={144}
  alt=""
  priority
/>