Image
Markdown for agentsResilient image with a two-step fallback chain, intrinsic dimensions and an LCP priority flag.
npx @slipstream-ui/cli@latest add imageFallback chain
Broken src, fallbackSrc

Every URL failed

Dimensions and priority
Above-the-fold hero: priority, explicit 16:9 box
The width and height attributes reserve the 16:9 box before the file arrives, so nothing moves.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| src | string | — | Primary image URL. Hotlinked sources are expected. |
| alt | string | — | Required: describes the image content, not the component. |
| fallbackSrc | string | — | Second URL tried before the fallback node, such as generated placeholder art. |
| fallback | React.ReactNode | — | Content rendered when every URL has failed (icon, initials, empty panel). |
| priority | boolean | false | Load eagerly and fetch at high priority for the one above-the-fold image. |
| width | number | 1200 | Intrinsic width, always emitted so the browser reserves space. |
| height | number | 630 | Intrinsic height, always emitted so the browser reserves space. |
| className | string | — | Classes for the image. |
| imgClassName | string | — | Extra classes merged after className. |
| style | React.CSSProperties | — | Inline styles for the image. |
Accessibility
- alt is required by the type; describe the image, not the component.
- Intrinsic width and height are always emitted, so a failed or slow image never shifts the layout.
- Only the priority image loads eagerly; every other image is lazy and decodes asynchronously.
- Fallback content should carry the same information as the image, not a second description.
- Set alt="" on a decorative image whose fallback already shows the message.
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+ — macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA — the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.