Skip to content

keryx post image

Description

Give a post its image from one of three sources (spec 0062 D4, D5). --from-cover encodes the article's cover to JPEG beside it (cover-<slug>.jpg). --pick <path> copies a picture the project already has, by its project-relative path: a reel's cover, card, portrait or take, another post's image, or an article's cover. --gen "<brief>" generates candidates with the cover machinery (the theme's aesthetic, --theme to name one, --takes for how many, --aspect for the frame, 1:1 by default so a post is uncropped everywhere it can go) into the post's own take slot, posts/<article>/<post>/cover/takes/, and lists them; --take T makes one the post's image, promoting it to the slot's cover.png (which media push carries, like a reel's) and copying it into the bundle. --gen spends: one image-provider call per take. The copy lands in the article's bundle as post-<id>.jpg, whatever the source's format; the source is never referenced in place (R-ANN-23). A reel file that is not on disk but is in the workspace's media.lock is fetched from the object store first, that file alone.

Either way the public URL follows from announce.public_base_url, the alt text is kept, and image.source records where the file came from (R-ANN-25). The studio's Pick… gallery is the same operation with thumbnails; GET /api/v1/imagery lists what it offers.

Usage

keryx post image --article <dir> --post <id> (--from-cover | --pick <path> | --gen "<brief>" [--theme k] [--takes n] [--aspect W:H] [--take T] | --take T)

keryx post image --article content/post/my-post --post launch --from-cover
keryx post image --article content/post/my-post --post launch --pick reels/my-post/cover.png
keryx post image --article content/post/my-post --post recap --pick content/post/other/post-launch.jpg
keryx post image --article content/post/my-post --post launch --gen "a desk at dawn, one lamp" --takes 3
keryx post image --article content/post/my-post --post launch --take 2

Flags

Flag Description Default Required
--article the article's bundle directory yes
--post the post piece (its id, from post new) yes
--from-cover use the article's cover false
--pick a project-relative path to copy in
--gen generate candidates from this brief (spends)
--theme theme keyword for --gen the project's
--takes how many candidates --gen makes 2
--aspect frame for --gen, W:H 1:1
--take make generated take T the post's image
--force regenerate even when the brief is unchanged false

Exactly one source: --from-cover, --pick, --gen (with or without --take), or --take alone for a take generated earlier.