2026-07-20 14:15:45 +02:00
# `<image>`
2026-07-08 22:33:29 +02:00
An image. `src` resolves to an image asset (see [media.md ](./media.md )).
```tsx
2026-07-20 14:15:45 +02:00
< image src = "/photo.jpg" x = {40} y = {40} width = {200} height = {112} / >
2026-07-08 22:33:29 +02:00
```
## Props
All [common props ](./elements.md#common-props ), plus:
| Prop | Type | Default | Meaning |
| ---- | ---- | ------- | ------- |
| `src` | `string \| AssetRef` | **required** | See [media.md ](./media.md ). |
2026-07-17 08:36:41 +02:00
| `objectFit` | `"cover" \| "contain" \| "fill"` | `"cover"` | How the source maps into the box. |
2026-07-08 22:33:29 +02:00
2026-07-20 20:56:32 +02:00
A paint child draws over the media paint created by `src` (see [paints.md ](./paints.md )); a [`<shaderPaint>` ](./shader-paint.md ) child instead post-processes it, so the image renders through the shader.