Cover Image
Every draft needs an explicit cover — flags, checks, generation, and the hero confusion.
Cover Image
Every draft needs a cover
Draft creation requires an explicit cover, in one of two mutually exclusive forms:
md2wechat convert article.md --draft --cover cover.jpg
md2wechat convert article.md --draft --cover-media-id <permanent_media_id>--cover <path>uploads a local image as the cover material.--cover-media-id <media_id>reuses an existing permanent material. URLs are rejected here.
Checks
inspect fails closed on cover problems with stable codes:
CONFLICTING_COVER_INPUTS— both--coverand--cover-media-idwere givenCOVER_MEDIA_ID_INVALID— the media id is not a valid permanent material idMISSING_COVER—--draftwas requested without any cover
Generate a cover
md2wechat generate_cover --preset cover-default --article article.mdGeneration produces and uploads the cover (a WeChat side effect). md2wechat write --cover-only instead returns a style-matched cover prompt for the host agent to render.
Cover vs hero module
- There is no
cover-herolayout module.cover-herois an image preset forgenerate_image. - The
:::heroadvanced layout module is the opening card inside the article body — unrelated to the draft cover. - The draft cover is submitted as WeChat
thumb_media_id, produced byuploadCoverImage → UploadMaterial → media_id.
Pipeline
--cover <path> → upload as material → media_id → attached to draft/add.