Image
A lazy image that keeps its space.
A static page with IzzyBlazor's script. No circuit.
An image that loads lazily and keeps its space while loading: width and height or a Ratio reserve the box, so the page doesn't jump. Caption wraps it in a figure.
Usage
<Image Src="/shots/console.png" Alt="The rules list" Ratio="16 / 9.0" Radius="Radius.Lg" />Ratio and fit
Use Ratio for the shape and Fit for whether the image fills it (Cover) or fits inside it (Contain).
Preview


Code
<Grid Columns="new() { Base = 1, Sm = 2 }" Gap="4" Grow>
<Image Src="og-image.png" Alt="The IzzyBlazor social card, cropped to 4:3" Ratio="4 / 3.0" Radius="Radius.Lg" Caption="Ratio 4:3, Cover" />
<Image Src="og-image.png" Alt="The IzzyBlazor social card, fitted into 4:3" Ratio="4 / 3.0" Fit="ImageFit.Contain" Radius="Radius.Lg" Bg="Color.Fill" Caption="Ratio 4:3, Contain" />
</Grid>Its own size
Use IntrinsicWidth and IntrinsicHeight so the browser keeps the image's space before it loads.
Preview

Code
<Image Src="og-image.png" Alt="The IzzyBlazor social card: Blazor components, no circuit required"
IntrinsicWidth="1200" IntrinsicHeight="630" Radius="Radius.Lg" MaxWidth="32.Rem" />Mode support
| Feature | Off | Static | Live |
|---|---|---|---|
| Everything | Yes | Yes | Yes |
Off: JavaScript disabled. Static: a static SSR page with IzzyBlazor's script. Live: an interactive page (Server, WebAssembly or Auto).
Accessibility
Parameters
| Prop | Type | Default |
|---|---|---|
SrcThe image URL. | string | Required |
AltWhat the image shows, for screen readers and when it fails to load. | string | Required |
IntrinsicWidthThe image's own width in pixels, so the browser reserves its space before it loads. | int? | |
IntrinsicHeightThe image's own height in pixels. | int? | |
RatioA shape to show it in, width over height, such as 16 / 9.0 or 1; the image fills it per Fit. | double? | |
FitHow it fills a Ratio of a different shape. | ImageFit | ImageFit.Cover |
LazyLoads only when the image nears the screen. | bool | true |
CaptionA caption under the image; wraps it in a figure. | string? |
Plus 25 surface props, 16 item props and 4 common props.
Full APISee also
- AspectRatio: keeps media at a shape, 16:9 by default.
- Avatar: a photo, initials or an icon.
- VideoEmbed: a YouTube video that loads on play.