Image Variable
An image source: any Asset (an 'asset:<id>' reference, HTTPS URL, data URI, relative or local path, or an object with src, alt and metadata). Reference it whole as 'var:<id>' in an image, asset or src field; '{{<id>}}' inserts the source string.
Metadata
Field index
| Field | Type | Req. | Description |
|---|---|---|---|
| type | const | yes | Variable kind. One of color, text, number, date, image, url or list.
|
| value | ref:Asset | — | Image source this variable resolves to. |
| required | boolean | — | Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted. |
| label | string | — | Optional short human label for forms and fill panels. |
| description | string | — | Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents. |
| example | ref:Asset | — | Illustrative image source shown in fill forms and used when a template is previewed with examples. Never written to output. |
type
typeconstrequiredyesdefault—
Variable kind. One of color, text, number, date, image, url or list.
type· Allowed values"image"
{
"type": "image"
}value
typeref:Assetrequirednodefault—
Image source this variable resolves to.
required
typebooleanrequirednodefaulttrue
Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted.
label
typestringrequirednodefault—
Optional short human label for forms and fill panels.
description
typestringrequirednodefault—
Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents.
example
typeref:Assetrequirednodefault—
Illustrative image source shown in fill forms and used when a template is previewed with examples. Never written to output.
Complete definition constraints
{
"type": "object",
"required": [
"type"
],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "image",
"description": "Variable kind. One of color, text, number, date, image, url or list."
},
"value": {
"$ref": "#/$defs/Asset",
"description": "Image source this variable resolves to."
},
"required": {
"type": "boolean",
"default": true,
"description": "Whether the variable must be filled. Defaults to true: a variable with no 'value' is unfilled, and an unfilled required variable is an error in a normal deck and expected in a template. Set false for an optional slot: an unfilled optional variable resolves to empty text (inline tokens) or the field that references it is omitted."
},
"label": {
"type": "string",
"description": "Optional short human label for forms and fill panels."
},
"description": {
"type": "string",
"description": "Optional prose describing what the variable is for, surfaced by pickers, fill forms and agents."
},
"example": {
"$ref": "#/$defs/Asset",
"description": "Illustrative image source shown in fill forms and used when a template is previewed with examples. Never written to output."
}
},
"description": "An image source: any Asset (an 'asset:<id>' reference, HTTPS URL, data URI, relative or local path, or an object with src, alt and metadata). Reference it whole as 'var:<id>' in an image, asset or src field; '{{<id>}}' inserts the source string."
}