Back to Colophon
Back to Colophon

Swapped every cover image on the site from Recraft v3 to v4. Same palette, same style prompt, better compositions. The prompt generation pipeline got an overhaul too.

#ai#images#fal#recraft

The swap#

Every blog post cover image on this site is AI-generated. The pipeline works like this: Opus generates an image prompt from the post content, then Recraft generates the image via Fal.ai using a fixed style prompt and color palette. Until today, that was Recraft v3 with digital_illustration style.

v4 dropped the explicit style parameter entirely. You describe what you want, and the model figures out the rendering approach. The results are cleaner and more compositionally balanced. Less random hallucinated objects (v3 had a tendency to sneak in animals and people regardless of the prompt).

The prompt problem#

The bigger issue wasn’t the image model. It was the prompts going into it. The LLM kept generating prompts that were too literal. A post about webpages becoming markdown? The prompt would describe “a webpage dissolving into tokens.” Every time.

Two fixes made the difference:

  1. Explicit anti-literal instructions in the template. “Never depict the literal topic. A post about websites should NOT show a website.” Plus requiring abstract geometric compositions described through shapes and spatial relationships only.

  2. Separating subject from style. The old prompts would bake in color and rendering directions (“rendered in cool slate and warm amber tones with sharp clean lines”) that fought with the style prompt. The new template tells the LLM to describe composition only. Style is handled separately.

The config#

json
{
  "model": "fal-ai/recraft/v4/text-to-image"
}

v4 uses preset image sizes (landscape_16_9) instead of exact pixel dimensions. No style parameter. Colors still work the same way. The generation script now branches on model version to build the right API input.

imageCredit#

Also added a per-post imageCredit frontmatter field that renders a small attribution line under each cover image. It adapts to whatever provider or model generated the image.

Swapped every cover image on the site from Recraft v3 to v4. Same palette, same style prompt, better compositions. The prompt generation pipeline got an overhaul too.