Package images and audio
Purpose and location
Place ordinary image/audio files directly inside media/. These are binary files, not JSON or JSONL. There is no asset catalog. The directory is optional.
Basic examples
Supply your own image and audio bytes for cat.png and example.wav. For downloadable placeholders, use the full example files below and keep their matching paths.
A card references them through values of fields defined in its deck. These JSON objects are nested field-value examples, not complete card records:
See the complete card example for where these objects go, and all field options for audio autoplay and image-occlusion masks.
Full example
The complete example package includes these real binary files, used by its full cards:
The matching nested values from the inherited language card are below. They are parts of a card record, not standalone media records. Its image-occlusion field references the same PNG with rectangle data; see the full card. Audio autoplay is set in the owning deck, or in a complete card override.
Filename and value options
Do not use an absolute filesystem path, web URL, base64 payload, or asset ID in place of mediaPath. Package checks cover paths, byte counts, and ZIP integrity. They do not decode images or audio, or enforce a filename-extension allowlist. Display and playback support belongs to the importing app.
Missing files and relationships
An existing referenced file must pass integrity/size checks. A missing referenced file is recoverable: the app keeps the card and leaves the field blank. If the missing image belongs to an image-occlusion field, the app clears its masks as well. Unreferenced media is skipped during payload validation.
For intentionally blank image occlusion, omit the path and masks (or use an empty mask list). Package validation accepts otherwise valid rectangles without an image path, but export rejects nonempty rectangles without an image path. Include the image for any masks you want to use. See field values.
There is no separate media-record schema. The field-value schema describes the JSON reference.