Image Component Guide

Learn how to use the Image component for responsive, optimized images


# Image Component Guide

The <image> component provides responsive, optimized images similar to Gatsby’s GatsbyImage and Astro’s Image.

# Quick Start

# Fixed Layout

Fixed size 800x600
<image
  src="/images/demos/demo-fixed-1600x1200.webp"
  width=800
  height=600
  layout="fixed"
/>

# Fluid Layout

Fluid landscape image
<image src="/images/demos/demo-fluid-1800x900.webp" layout="fluid" placeholder="blur" />

# Circular Avatars

Avatar 1
Avatar 2
<image
  src="/images/demos/demo-avatar-1.webp"
  width=100
  height=100
  layout="fixed"
  style={ borderRadius: '50%',
    border: '3px solid white',
    boxShadow: '0 2px 8px rgba(0,0,0,0.15)' }
/>
Gallery image 1
Gallery image 2
Gallery image 3
Gallery image 4

# Props

PropTypeDefaultDescription
srcstringrequiredImage path or URL
altstring''Alt text
widthnumberundefinedWidth in pixels
heightnumberundefinedHeight in pixels
layout'fixed' | 'fluid' | 'responsive''responsive'Layout mode
loading'lazy' | 'eager''lazy'Loading strategy
placeholder'blur' | 'none''none'Show blur placeholder
classstringundefinedCSS class
styleobjectundefinedInline styles