Image Post Generation
The high-engagement image post workflow generates static social media graphics with dynamic visuals and coherent text overlays designed to maximize engagement. Unlike video thumbnails, these are standalone graphic-design-oriented posts for platforms like Instagram, Twitter, LinkedIn, and Pinterest.
Quick Start
Section titled “Quick Start”# From a niche/topic — generates hooks, then imagesfabric run media/high-engagement-posts \ --input niche="AI productivity tools" \ --input platforms='["instagram-square", "twitter"]'
# From pre-existing hooks (skip hook generation)fabric run media/high-engagement-posts-from-hooks \ --input hook_ideas='[{"hook_text": "Stop using ChatGPT wrong"}]'
# Trending topics → posts (composed pipeline)fabric run global/hot-topics-to-postsPipeline Architecture
Section titled “Pipeline Architecture”Standalone Pipeline
Section titled “Standalone Pipeline”gather_competitor_insights → gather_trend_signals → generate_hook_ideas →craft_image_prompts → generate_post_images → score_post_images →prepare_post_outputFrom Pre-Existing Hooks
Section titled “From Pre-Existing Hooks”craft_image_prompts → generate_post_images → score_post_images →prepare_post_outputTrending Topics Composed Pipeline
Section titled “Trending Topics Composed Pipeline”hot_topics_pipeline → bridge_topics_to_hooks → generate_hook_ideas →craft_image_prompts → generate_post_images → score_post_images →prepare_post_outputPipeline Stages
Section titled “Pipeline Stages”1. Craft Image Prompts
Section titled “1. Craft Image Prompts”Takes hook ideas and produces image_specs[] — one per hook and platform combination.
- Condenses hooks to 1-5 word overlays (ALL CAPS, bold)
- LLM generates per-hook: visual concept, color direction, layout type, typography guidance
- Applies high-engagement design principles:
- Typography is the hero — text IS the content
- High contrast (dark text on light, white/yellow on dark gradient)
- Color psychology: red/orange = urgency, yellow = attention, blue = trust
- Clean negative space, no busy backgrounds
- Readable at phone-screen thumbnail size
- Graphic design aesthetic, not photography
2. Generate Post Images
Section titled “2. Generate Post Images”Two generation paths, automatically selected based on the configured model:
Uses Gemini’s native text rendering to generate images with text baked in:
- Text overlay is part of the image generation prompt
- Produces coherent, styled, visually integrated text
- Best quality for text-heavy engagement posts
Two-stage approach since local diffusion models can’t reliably render text:
- Generate the background visual via local model (no text in prompt)
- Composite text overlay via PIL (ImageDraw + ImageFont)
- Semi-transparent gradient/band in the text zone
- ALL CAPS, white text with black stroke
- Auto-sized bold sans-serif font
Each image spec generates num_variants (default 3) variants for selection.
3. Score Post Images
Section titled “3. Score Post Images”Sends generated images back to Gemini vision for quality scoring (1-10) across:
| Dimension | Description |
|---|---|
text_readability | Can the text be read at thumbnail size? |
visual_impact | Does the image grab attention in a scroll? |
text_image_coherence | Do text and visual work together? |
click_appeal | Would you stop and click? |
platform_fit | Does it match the platform’s aesthetic? |
Images below threshold (default 6.0) are flagged. Set auto_regenerate=true to automatically retry low-scoring images.
4. Prepare Post Output
Section titled “4. Prepare Post Output”Ranks results by score and identifies the best variant per platform.
Input Parameters
Section titled “Input Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
niche | string | required | Content niche for hook generation |
hook_ideas | list[dict] | generated | Pre-existing hooks (skips generation) |
platforms | list[str] | ["instagram-square", "twitter"] | Target platforms |
brand_style | string | "" | Brand style guidelines |
num_variants | int | 3 | Variants per image spec |
auto_regenerate | bool | false | Auto-retry low-scoring images |
quality | string | "" | Quality preset (affects image model) |
Platform Sizes
Section titled “Platform Sizes”| Platform | Dimensions | Aspect Ratio |
|---|---|---|
instagram-square | 1080 x 1080 | 1:1 |
instagram-portrait | 1080 x 1350 | 4:5 |
instagram-story | 1080 x 1920 | 9:16 |
twitter | 1200 x 675 | 16:9 |
facebook | 1200 x 630 | 16:9 |
linkedin | 1200 x 627 | 16:9 |
pinterest | 1000 x 1500 | 2:3 |
threads | 1080 x 1080 | 1:1 |
Output
Section titled “Output”{ "posts": [ { "hook_text": "Stop using ChatGPT wrong", "overlay_text": "STOP USING CHATGPT WRONG", "platform": "instagram-square", "image_path": "/tmp/post_001.png", "scores": { "text_readability": 8, "visual_impact": 9, "text_image_coherence": 7, "click_appeal": 8, "platform_fit": 9 }, "overall_score": 8.2, "variant_index": 0, "generation_method": "gemini_native" } ], "best_per_platform": { "instagram-square": 0, "twitter": 2 }, "workflow": "high-engagement-posts"}Model Configuration
Section titled “Model Configuration”The workflow uses a post operation in the model configuration system:
| Profile | Model | Text Rendering |
|---|---|---|
| (default) | gemini-3.1-flash-image-preview | Native (in-image) |
premium | gemini-3.1-flash-image-preview | Native (in-image) |
local | sdxl-turbo | PIL overlay |
local-power | flux-schnell | PIL overlay |
Override per-run:
fabric run media/high-engagement-posts \ --input niche="AI tools" \ --input post_model="flux-schnell"Layout Types
Section titled “Layout Types”The craft_image_prompts task selects a layout type for text placement:
| Layout | Description |
|---|---|
centered | Semi-transparent dark rectangle centered, text centered within |
banner | Solid/gradient band across top or bottom third |
split | Dark half on left or right, text on the dark side |
gradient | Gradient overlay from bottom, text in lower portion |