Open Presentation

Search docs

Loading documentation…
    OpenPresentation/opf
    Browse docs
    On this page
    View source

    Image Source

    An image source in a string shorthand: an 'asset:<id>' reference, an HTTPS URL, a data URI, or a relative path starting with './' or '../' (resolved against the OPF file location).

    Metadata

    Definition
    #/$defs/ImageSource
    Form
    string
    Source
    spec/schemas/opf.schema.json

    Field index

    This definition uses the forms or value constraints below.

    Complete definition constraints
    Schema constraints
    {
      "type": "string",
      "pattern": "^(asset:|https://|data:|\\./|\\.\\./)",
      "description": "An image source in a string shorthand: an 'asset:<id>' reference, an HTTPS URL, a data URI, or a relative path starting with './' or '../' (resolved against the OPF file location).",
      "examples": [
        "asset:cover-photo",
        "https://cdn.acme.com/backgrounds/cover.jpg",
        "./images/harbour.jpg"
      ]
    }