How to build an accessible Image in React

role="img" with alt names the image; on error it shows a fallback image or neutral box so layout survives; the blur-up and zoom transitions are disabled under prefers-reduced-motion

When to use a Image

When not to use it

Accessibility

Role img, verified at WCAG 2.2-AA.

Common mistakes

Avoid: <Image src="/photo.jpg" /> with no alt

Prefer: <Image src="/photo.jpg" alt="Sunset over the bay" />

Without alt the image is invisible to assistive tech; pass an empty alt only for decorative images

Example

<Image src="/photo.jpg" alt="A photo" width={320} height={240} />

See the full Image reference →