cover-image

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cover Image Generator

封面图生成器

Generate elegant cover images for articles with 5-dimensional customization. Supports Chinese text rendering.
通过5维度自定义生成精美的文章封面图,支持中文文本渲染。

Usage

使用方法

bash
undefined
bash
undefined

Auto-select dimensions based on content

根据内容自动选择维度

/cover-image path/to/article.md
/cover-image path/to/article.md

Quick mode: skip confirmation

快速模式:跳过确认步骤

/cover-image article.md --quick
/cover-image article.md --quick

Specify dimensions

指定维度参数

/cover-image article.md --type conceptual --palette warm --rendering flat-vector
/cover-image article.md --type conceptual --palette warm --rendering flat-vector

WeChat Official Account cover

微信公众号封面

/cover-image article.md --aspect 2.35:1
/cover-image article.md --aspect 2.35:1

Specify provider

指定生成提供商

/cover-image article.md --provider qwen
/cover-image article.md --provider qwen

Use style preset

使用预设风格

/cover-image article.md --style tech-dark
/cover-image article.md --style tech-dark

Large font for better visibility

大字体提升可见度

/cover-image article.md --font-size large
/cover-image article.md --font-size large

Generate multiple options

生成多个备选封面

/cover-image article.md --n 3
/cover-image article.md --n 3

With reference images (Google/OpenAI only)

参考图片生成(仅支持Google/OpenAI)

/cover-image article.md --ref style-ref.png
/cover-image article.md --ref style-ref.png

Direct content input

直接输入内容生成

/cover-image --palette mono --aspect 1:1 --quick [paste content]
undefined
/cover-image --palette mono --aspect 1:1 --quick [paste content]
undefined

Options

可选参数

OptionDescription
--type <name>
hero, conceptual, typography, metaphor, scene, minimal
--palette <name>
warm, elegant, cool, dark, earth, vivid, pastel, mono, retro
--rendering <name>
flat-vector, hand-drawn, painterly, digital, pixel, chalk
--text <level>
none, title-only, title-subtitle, text-rich
--mood <level>
subtle, balanced, bold
--font <name>
clean, handwritten, serif, display
--font-size <size>
small, medium (default), large, xlarge
--aspect <ratio>
16:9 (default), 2.35:1 (公众号封面), 4:3, 3:2, 1:1, 3:4
--provider <name>
qwen (default), openai, google
--style <preset>
tech-dark, tech-clean, lifestyle-warm, business-elegant, announcement-bold, minimal-zen, creative-playful, retro-vintage
--lang <code>
Title language (en, zh, ja, etc.)
--no-title
Alias for
--text none
--n <count>
Number of images to generate (1-4)
--quick
Skip confirmation, use auto-selection
--ref <files...>
Reference images for style/composition guidance
参数说明
--type <name>
封面类型:hero, conceptual, typography, metaphor, scene, minimal
--palette <name>
配色方案:warm, elegant, cool, dark, earth, vivid, pastel, mono, retro
--rendering <name>
渲染风格:flat-vector, hand-drawn, painterly, digital, pixel, chalk
--text <level>
文本呈现:none, title-only, title-subtitle, text-rich
--mood <level>
氛围风格:subtle, balanced, bold
--font <name>
字体类型:clean, handwritten, serif, display
--font-size <size>
字体大小:small, medium(默认), large, xlarge
--aspect <ratio>
比例:16:9(默认), 2.35:1(公众号封面), 4:3, 3:2, 1:1, 3:4
--provider <name>
生成提供商:qwen(默认), openai, google
--style <preset>
预设风格:tech-dark, tech-clean, lifestyle-warm, business-elegant, announcement-bold, minimal-zen, creative-playful, retro-vintage
--lang <code>
标题语言(en, zh, ja等)
--no-title
--text none
的别名,不显示文本
--n <count>
生成图片数量(1-4张)
--quick
跳过确认步骤,使用自动选择配置
--ref <files...>
用于风格/构图参考的图片

Providers

生成提供商

ProviderModelText RenderingChinese SupportPrice
qwen
qwen-image-plusExcellentNative Chinese0.2 CNY/image
openai
gpt-image-1GoodLimited~$0.04/image
google
gemini-2.0-flash-expGoodLimitedFree tier available
提供商模型文本渲染中文支持价格
qwen
qwen-image-plus优秀原生中文支持0.2元/张
openai
gpt-image-1良好有限支持~0.04美元/张
google
gemini-2.0-flash-exp良好有限支持提供免费额度

Provider Selection Logic

提供商选择逻辑

  1. --provider
    specified -> use it
  2. Chinese title detected -> auto-select
    qwen
  3. Reference images provided -> use
    google
    or
    openai
  4. Default ->
    qwen
  1. 指定
    --provider
    参数时,使用指定的提供商
  2. 检测到中文标题时,自动选择
    qwen
  3. 提供参考图片时,使用
    google
    openai
  4. 默认使用
    qwen

Qwen-Image (Default)

Qwen-Image(默认)

Best for Chinese text rendering. Native support for Chinese characters.
API Endpoint:
https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis
Environment Variable:
DASHSCOPE_API_KEY
Supported Sizes:
1664*928
,
1024*1024
,
928*1664
,
1472*1104
,
1104*1472
最适合中文文本渲染,原生支持中文字符。
API端点
https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis
环境变量
DASHSCOPE_API_KEY
支持尺寸
1664*928
,
1024*1024
,
928*1664
,
1472*1104
,
1104*1472

OpenAI

OpenAI

Good for English text and creative designs.
Environment Variable:
OPENAI_API_KEY
Supported Sizes:
1024x1024
,
1536x1024
,
1024x1536
适合英文文本和创意设计。
环境变量
OPENAI_API_KEY
支持尺寸
1024x1024
,
1536x1024
,
1024x1536

Google

Google

Good for multimodal generation with reference images.
Environment Variable:
GOOGLE_API_KEY
Supported Sizes: Various aspect ratios supported
适合结合参考图片的多模态生成。
环境变量
GOOGLE_API_KEY
支持尺寸:支持多种比例

Five Dimensions

5个自定义维度

DimensionValuesDefault
Typehero, conceptual, typography, metaphor, scene, minimalauto
Palettewarm, elegant, cool, dark, earth, vivid, pastel, mono, retroauto
Renderingflat-vector, hand-drawn, painterly, digital, pixel, chalkauto
Textnone, title-only, title-subtitle, text-richtitle-only
Moodsubtle, balanced, boldbalanced
Fontclean, handwritten, serif, displayclean
Auto-selection rules: references/auto-selection.md
维度可选值默认值
类型hero, conceptual, typography, metaphor, scene, minimal自动选择
配色warm, elegant, cool, dark, earth, vivid, pastel, mono, retro自动选择
渲染风格flat-vector, hand-drawn, painterly, digital, pixel, chalk自动选择
文本呈现none, title-only, title-subtitle, text-richtitle-only
氛围subtle, balanced, boldbalanced
字体clean, handwritten, serif, displayclean
自动选择规则:references/auto-selection.md

Galleries

效果示例库

Types: hero, conceptual, typography, metaphor, scene, minimal -> Details: references/types.md
Palettes: warm, elegant, cool, dark, earth, vivid, pastel, mono, retro -> Details: references/palettes/
Renderings: flat-vector, hand-drawn, painterly, digital, pixel, chalk -> Details: references/renderings/
Text Levels: none (pure visual) | title-only (default) | title-subtitle | text-rich (with tags) -> Details: references/dimensions/text.md
Mood Levels: subtle (low contrast) | balanced (default) | bold (high contrast) -> Details: references/dimensions/mood.md
Fonts: clean (sans-serif) | handwritten | serif | display (bold decorative) -> Details: references/dimensions/font.md
类型:hero, conceptual, typography, metaphor, scene, minimal -> 详情:references/types.md
配色方案:warm, elegant, cool, dark, earth, vivid, pastel, mono, retro -> 详情:references/palettes/
渲染风格:flat-vector, hand-drawn, painterly, digital, pixel, chalk -> 详情:references/renderings/
文本呈现级别:none(纯视觉)| title-only(默认)| title-subtitle | text-rich(含标签) -> 详情:references/dimensions/text.md
氛围级别:subtle(低对比度)| balanced(默认)| bold(高对比度) -> 详情:references/dimensions/mood.md
字体类型:clean(无衬线)| handwritten | serif | display(粗体装饰性) -> 详情:references/dimensions/font.md

File Structure

文件结构

Output directory per
default_output_dir
preference:
  • same-dir
    :
    {article-dir}/
  • imgs-subdir
    :
    {article-dir}/imgs/
  • independent
    (default):
    cover-image/{topic-slug}/
<output-dir>/
├── source-{slug}.{ext}    # Source files
├── refs/                  # Reference images (if provided)
│   ├── ref-01-{slug}.{ext}
│   └── ref-01-{slug}.md   # Description file
├── prompts/cover.md       # Generation prompt
└── cover.png              # Output image
Slug: 2-4 words, kebab-case. Conflict: append
-YYYYMMDD-HHMMSS
输出目录根据
default_output_dir
偏好设置:
  • same-dir
    {文章目录}/
  • imgs-subdir
    {文章目录}/imgs/
  • independent
    (默认):
    cover-image/{主题-slug}/
<输出目录>/
├── source-{slug}.{ext}    # 源文件
├── refs/                  # 参考图片(若提供)
│   ├── ref-01-{slug}.{ext}
│   └── ref-01-{slug}.md   # 描述文件
├── prompts/cover.md       # 生成提示词
└── cover.png              # 输出图片
Slug:2-4个单词,短横线分隔。若重名,追加
-YYYYMMDD-HHMMSS

Workflow

工作流程

Progress Checklist

进度检查清单

Cover Image Progress:
- [ ] Step 1: Analyze content + save refs + determine output dir
- [ ] Step 2: Confirm options (6 dimensions + provider) unless --quick
- [ ] Step 3: Create prompt
- [ ] Step 4: Generate image
- [ ] Step 5: Resize for platform (if needed)
- [ ] Step 6: Completion report
封面图生成进度:
- [ ] 步骤1:分析内容 + 保存参考图 + 确定输出目录
- [ ] 步骤2:确认参数(6个维度 + 提供商),使用--quick时跳过
- [ ] 步骤3:创建生成提示词
- [ ] 步骤4:生成图片
- [ ] 步骤5:根据平台调整尺寸(若需要)
- [ ] 步骤6:生成完成报告

Step 1: Analyze Content

步骤1:内容分析

  1. Save reference images (if provided) -> references/workflow/reference-images.md
  2. Save source content (if pasted, save to
    source.md
    )
  3. Analyze content: topic, tone, keywords, visual metaphors
  4. Deep analyze references: Extract specific, concrete elements
  5. Detect language: Compare source, user input
  6. Determine output directory: Per File Structure rules
  7. Auto-select provider: Based on language and references
  1. 保存参考图片(若提供)-> references/workflow/reference-images.md
  2. 保存源内容(若直接粘贴内容,保存到
    source.md
  3. 分析内容:主题、语气、关键词、视觉隐喻
  4. 深度分析参考图:提取具体、明确的元素
  5. 检测语言:对比源内容和用户输入
  6. 确定输出目录:按照文件结构规则
  7. 自动选择提供商:基于语言和参考图

Step 2: Confirm Options

步骤2:确认参数

Full confirmation flow: references/workflow/confirm-options.md
ConditionSkippedStill Asked
--quick
6 dimensions + providerAspect ratio (unless
--aspect
)
All 6 +
--aspect
+
--provider
specified
AllNone
完整确认流程:references/workflow/confirm-options.md
条件跳过确认仍需确认
使用
--quick
6个维度 + 提供商比例(除非指定
--aspect
已指定全部6个维度 +
--aspect
+
--provider
全部

Step 3: Create Prompt

步骤3:创建提示词

Save to
prompts/cover.md
. Template: references/workflow/prompt-template.md
CRITICAL - References in Frontmatter:
  • Files saved to
    refs/
    -> Add to frontmatter
    references
    list
  • Style extracted verbally (no file) -> Omit
    references
    , describe in body
  • Before writing -> Verify:
    test -f refs/ref-NN-{slug}.{ext}
Reference elements in body MUST be detailed, prefixed with "MUST"/"REQUIRED", with integration approach.
保存到
prompts/cover.md
。模板:references/workflow/prompt-template.md
关键 - 参考图在前置元数据中
  • 保存到
    refs/
    的文件 -> 添加到前置元数据
    references
    列表
  • 仅提取风格描述(无文件)-> 省略
    references
    ,在正文中描述
  • 编写前验证:
    test -f refs/ref-NN-{slug}.{ext}
正文中的参考元素必须详细描述,前缀为“必须”/“要求”,并说明整合方式。

Step 4: Generate Image

步骤4:生成图片

  1. Backup existing
    cover.png
    if regenerating
  2. Select provider based on language and options
  3. Process references from prompt frontmatter:
    • direct
      usage -> pass reference images directly (google/openai only)
    • style
      /
      palette
      -> extract traits, append to prompt
  4. Generate via provider API:
    • Qwen: POST to dashscope API, poll for result
    • OpenAI: Use ImageGen tool or API
    • Google: Use ImageGen tool with reference images
  5. On failure: auto-retry once
  1. 备份现有
    cover.png
    (若重新生成)
  2. 选择提供商:基于语言和参数设置
  3. 处理提示词中的参考图
    • direct
      使用方式 -> 直接传入参考图片(仅google/openai支持)
    • style
      /
      palette
      使用方式 -> 提取特征,追加到提示词
  4. 通过提供商API生成
    • Qwen:向dashscope API发送POST请求,轮询获取结果
    • OpenAI:使用ImageGen工具或API
    • Google:使用ImageGen工具结合参考图片
  5. 生成失败时:自动重试一次

Step 5: Resize for Platform

步骤5:根据平台调整尺寸

Resize generated image to target platform size:
PlatformTarget SizeAspect Ratio
公众号封面900x3832.35:1
博客/视频1920x108016:9
小红书1080x10801:1
手机海报1080x14403:4
将生成的图片调整为目标平台尺寸:
平台目标尺寸比例
微信公众号封面900x3832.35:1
博客/视频1920x108016:9
小红书1080x10801:1
手机海报1080x14403:4

Step 6: Completion Report

步骤6:完成报告

Cover Generated!

Provider: [provider]
Topic: [topic]
Type: [type] | Palette: [palette] | Rendering: [rendering]
Text: [text] | Mood: [mood] | Font: [font] | Aspect: [ratio]
Title: [title or "visual only"]
Language: [lang]
References: [N images or "extracted style" or "none"]
Location: [directory path]

Files:
- source-{slug}.{ext}
- prompts/cover.md
- cover.png
- cover-{platform}.png (if resized)
封面图生成完成!

提供商:[提供商名称]
主题:[主题]
类型:[类型] | 配色:[配色] | 渲染风格:[渲染风格]
文本呈现:[文本级别] | 氛围:[氛围] | 字体:[字体] | 比例:[比例]
标题:[标题或“纯视觉”]
语言:[语言]
参考图:[N张图片或“提取的风格”或“无”]
位置:[目录路径]

生成文件:
- source-{slug}.{ext}
- prompts/cover.md
- cover.png
- cover-{platform}.png(若调整过尺寸)

Composition Principles

构图原则

  • Whitespace: 40-60% breathing room
  • Visual anchor: Main element centered or offset left
  • Characters: Simplified silhouettes; NO realistic humans
  • Title: Use exact title from user/source; never invent
  • 留白:40-60%的呼吸空间
  • 视觉锚点:主元素居中或左偏移
  • 人物元素:使用简化剪影;禁止使用写实人类形象
  • 标题:使用用户/源内容中的准确标题;禁止自行创作

Aspect Ratios

比例说明

RatioPlatformUse Case
2.35:1
微信公众号封面公众号首图,900x383px
16:9
通用宽屏博客、视频封面
1:1
社交媒体微博、小红书、Instagram
4:3
经典比例演示文稿、传统媒体
3:2
摄影标准照片风格封面
3:4
竖版手机端、海报
比例平台使用场景
2.35:1
微信公众号封面公众号首图,900x383px
16:9
通用宽屏博客、视频封面
1:1
社交媒体微博、小红书、Instagram
4:3
经典比例演示文稿、传统媒体
3:2
摄影标准照片风格封面
3:4
竖版手机端、海报

Environment Variables

环境变量

VariableRequired ForGet From
DASHSCOPE_API_KEY
Qwen (default)https://bailian.console.aliyun.com
OPENAI_API_KEY
OpenAIhttps://platform.openai.com
GOOGLE_API_KEY
Googlehttps://aistudio.google.com
变量适用场景获取地址
DASHSCOPE_API_KEY
Qwen(默认)https://bailian.console.aliyun.com
OPENAI_API_KEY
OpenAIhttps://platform.openai.com
GOOGLE_API_KEY
Googlehttps://aistudio.google.com

References

参考文档

Dimensions: text.md | mood.md | font.md Palettes: references/palettes/ Renderings: references/renderings/ Types: references/types.md Style Presets: references/style-presets.md Auto-Selection: references/auto-selection.md Visual Elements: references/visual-elements.md Workflow: confirm-options.md | prompt-template.md | reference-images.md | qwen-api.md
维度说明text.md | mood.md | font.md 配色方案references/palettes/ 渲染风格references/renderings/ 封面类型references/types.md 预设风格references/style-presets.md 自动选择规则references/auto-selection.md 视觉元素references/visual-elements.md 工作流程confirm-options.md | prompt-template.md | reference-images.md | qwen-api.md