# `<image>`

[Canonical page](https://nothing.graphics/docs/format/reference/image) · [Page source on GitHub](https://github.com/gridaco/nothing/blob/main/ncf/docs/reference/image.md)

Paint a still raster or SVG asset through the owning operation.



<!-- Generated by ncf/tools/reference/generate.mjs. -->

An image paint fits source artwork to the local geometry bounds. It uses the asset as an independent still image, with its own intrinsic proportions and alpha.

## Syntax [#syntax]

### Use an editable SVG as paint [#use-an-editable-svg-as-paint]

Resolve the SVG beside the declaring scene. At base the first shape fits it into the rectangle at (4, 8) with extent 80 × 40. At frame 12 the shape moves down to y = 20 with the same source image.

```xml
<image href="./mark.svg"/>
```

[Complete .nothing source](https://github.com/gridaco/nothing/blob/main/ncf/examples/linked-artwork/scene.nothing) · [Sample checks](https://github.com/gridaco/nothing/blob/main/ncf/conformance/README.md#a-linked-svg-with-no-intrinsic-aspect-ratio)

## Usage context [#usage-context]

Allowed parents are [`<paint>`](https://nothing.graphics/docs/format/reference/paint).

A strict sample needs the referenced resource. A still SVG uses its own internal IDs and may use embedded data. Scripting, interaction and external asset loading inside the SVG are disabled.

## Attributes [#attributes]

[Property animation](https://nothing.graphics/docs/format/spec/animation#property-types-and-exceptions)

### `href` [#href]

**Value** `Asset reference relative to the declaring document` · **Required** · **Keys** Static

Path to the still image.

### `preserveAspectRatio` [#preserveaspectratio]

**Value** `xMidYMid slice` · **Keys** Held

The defined fit centers the asset and scales it uniformly to cover both axes of the geometry bounds before applying coverage. Other fit values are outside this profile. The linked still image examples also use this fit when the attribute is omitted.

## Children [#children]

| Elements                                                              | Cardinality  | Declared by | Role and source order                                                                                                                                                                                                |
| --------------------------------------------------------------------- | ------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`<animate>`](https://nothing.graphics/docs/format/reference/animate) | Zero or more | Animation   | A track targets one keyable property on this owner. For equal first-key times, the later track in document order wins. [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation) |

## Specifications [#specifications]

* [Paint](https://nothing.graphics/docs/format/spec/graphics#paint)
* [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation)
