Skip to content

Asset Generation

AI-generated images are created by the Image Planner Agent and stored in Cloudflare R2.

Visual World Consistency

The Image Planner establishes a visual world prefix once, then applies it to all image prompts for a project. This ensures all images feel like they belong to the same shoot/style.

Example visual world prefix:

"Corporate photography, soft natural light, clean white studio backgrounds, professional German business aesthetic, muted color palette with warm tones, high-end editorial quality —"

All subsequent prompts are prefixed with this, ensuring:

  • Consistent lighting
  • Consistent color grading
  • Consistent subject style
  • No jarring mismatches between sections

Prompt Structure

typescript
interface ImagePrompt {
  worldPrefix: string    // Shared visual world definition
  subject: string        // What this specific image shows
  role: ImageRole        // How it's used on the page
  dimensions: Dimensions // Width × Height
}

// Full prompt = worldPrefix + ", " + subject
const fullPrompt = `${worldPrefix}, ${subject}`

Image Roles

RoleTypical UseAspect Ratio
heroFull-width hero background16:9
featureFeature section illustration4:3 or 1:1
teamTeam member portrait3:4
backgroundSubtle section texture16:9
iconSection icon/illustration1:1

Storage

Assets are stored in Cloudflare R2 under:

r2://[bucket]/projects/[projectId]/assets/[assetId].[ext]

Public CDN URL:

https://assets.design.localsolutions.de/projects/[projectId]/[assetId].[ext]

Regeneration

Users can regenerate any single image without re-running the full pipeline:

typescript
// POST /api/assets/regenerate
{
  "assetId": "uuid",
  "modifiedPrompt": "Same world prefix, but now show a team meeting instead"
}

Internal documentation for development team