Meridian handbook
ReferenceCLI

media

engine-dmo media: The media library: its size and alt text coverage, and the image pipeline's resolved transforms. Every subcommand, argument and flag.

The media library: its size and alt text coverage, and the image pipeline’s resolved transforms.

CommandWhat it does
engine-dmo media importUpload the files a media manifest lists through the pipeline, under the manifest’s ids, with alt text, captions and rights; --dry-run writes nothing
engine-dmo media pruneRemove image derivatives not served since a period, of deleted assets, of old asset versions or of retired definitions
engine-dmo media statsThe library’s size, its stored derivatives by transform and format, and alt text and caption coverage by site and locale
engine-dmo media transformsThe resolved image transforms of the install or a site, each with its width ladder and the formats this build serves
engine-dmo media warmRender published pages in process and generate the image derivatives they reference, with progress

engine-dmo media import

Reads a meridian.media.v1 manifest and uploads each file beside it through the media pipeline: sniffed, size-checked, its metadata stripped, recorded under the id the manifest gives it. An id the library already holds is reported as exists and left alone, so the import runs again safely. Assets without a licence are counted for rights review; the library’s No rights recorded filter lists them.

engine-dmo media import [flags]
FlagTypeDefaultMeaning
--dry-runboolcheck every file and say what would happen, writing nothing
--manifeststringthe meridian.media.v1 manifest; its files are read relative to it

--json prints the command’s own JSON document. Runs in a project.

engine-dmo media prune

Removes every derivative of a deleted asset; those not served or warmed for --older-than (default media.derivatives.keep_unused, 90d); and, once unused for a day, those of an old asset version or of a definition no transform produces any more. The record and the stored file both go; the bytes freed are reported. --dry-run removes nothing.

engine-dmo media prune [flags]
FlagTypeDefaultMeaning
--dry-runboolremove nothing; report what would go and the bytes it would free
--older-thanstringremove derivatives not served for this long, such as 90d (default media.derivatives.keep_unused)

--json prints the command’s own JSON document. Runs in a project.

engine-dmo media stats

Counts the assets and their bytes, then for the defaults every site shows and for each site, in each locale it enables, how many images have alt text of their own in the locale (the site’s wording or the default), how many show it from a fallback locale and how many have none. A site counts the images its documents use; the defaults count every image. Decorative images are counted apart. --site narrows the report to one site. The derivatives are counted by the transform name they were generated under and their format, with their bytes.

engine-dmo media stats [flags]
FlagTypeDefaultMeaning
--sitestringa site key: its coverage alone

--json prints the command’s own JSON document. Runs in a project.

engine-dmo media transforms

Lists every transform a template can name, resolved over the defaults of config/images.yaml and, with --site, the site’s own images.yaml. Each ladder is shown for a nominal 4000 pixel source and, with --source-width, for a source of that width: nothing is upscaled, so a narrower source drops the steps above its width and serves its own width as the top step.

engine-dmo media transforms [flags]
FlagTypeDefaultMeaning
--sitestringa site key: its transforms, with its images.yaml applied
--source-heightint0the source’s height, with --source-width, for crops the height limits
--source-widthint0also show each ladder for a source this many pixels wide

--json prints the command’s own JSON document. Runs in a project.

engine-dmo media warm

Renders each published page through the real pipeline with no visitor, as engine-dmo render does, collects every derivative its markup references (src, srcset, a picture’s sources, the preloads) and generates the ones not stored, JPEG before WebP before AVIF. --dry-run generates nothing and counts what is missing; it reports nothing to do once every derivative the pages use is stored. Progress goes to standard error.

engine-dmo media warm [flags]
FlagTypeDefaultMeaning
--documentstringa document id: its pages alone
--dry-runboolgenerate nothing; count the derivatives not yet stored
--shardstringi/n: this run’s share of the pages, every nth from the ith (0/4, 1/4, 2/4, 3/4 split them four ways)
--sitestringa site key: its pages alone
--typestringa type key: its documents’ pages alone

--json prints the command’s own JSON document. Runs in a project.