Image

Display optimized images with captions and zoom functionality

The Image component displays optimized images with optional captions and zoom-on-click functionality.

Usage

Code
mdx
1<Image
2 src="/images/screenshot.png"
3 alt="Application screenshot"
4 caption="Dashboard overview"
5/>

Live Example

Documentation system illustration
Modern documentation platform

Placeholder Image
Local placeholder image

Props

PropTypeDefaultDescription
srcstringrequiredImage source URL
altstringrequiredAccessible alt text
captionstring-Caption displayed below image
widthnumber1200Image width
heightnumber675Image height
zoombooleantrueEnable click-to-zoom

Features

Zoom Functionality

Info
Click on any image to view it in a full-screen lightbox. A zoom icon appears on hover.

Captions

Add context to images with the caption prop. Captions are styled italicized and centered below the image.

Optimization

Images are automatically optimized using optimized images for:

  • Lazy loading
  • Responsive sizing
  • Modern formats (WebP)
  • Caching

Best Practices

  • Always provide descriptive alt text for accessibility
  • Use appropriate width and height to prevent layout shift
  • Add caption for complex diagrams or screenshots that need explanation
  • Set zoom={false} for decorative or small images