OPF
SpecDefinition referenceView source

Assets

Reusable asset registry for resources used by slides, charts, metadata, and design. Keys are stable asset ids referenced elsewhere as 'asset:<id>'. Each asset can be a source string or an object with src plus optional metadata.

Metadata

Definition
#/$defs/Assets
Form
Dictionary
Source
spec/schemas/opf.schema.json

Field index

This definition uses the forms or value constraints below.

Complete definition constraints
Schema constraints
{
  "type": "object",
  "description": "Reusable asset registry for resources used by slides, charts, metadata, and design. Keys are stable asset ids referenced elsewhere as 'asset:<id>'. Each asset can be a source string or an object with src plus optional metadata.",
  "propertyNames": {
    "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$"
  },
  "additionalProperties": {
    "$ref": "#/$defs/Asset"
  },
  "examples": [
    {
      "acme-logo": "./assets/acme-logo.svg",
      "watermark": {
        "src": "./assets/watermark.png",
        "alt": "Acme watermark"
      },
      "revenue": {
        "src": "./data/revenue.csv",
        "mediaType": "text/csv"
      }
    }
  ]
}