Skip to content

Image generation config

Detailed configuration for the AI image generation feature. See also Features → Image generation for the high-level overview.

Master toggle

Activer la génération d’image: when off, no image is ever generated. When on, the plugin generates a featured image during rewrite if the article has none, and generates info-card images when URL enrichment is used.

Model selection

Two ways:

  1. Curated radio buttons — pick from models we’ve tested and confirmed working
  2. Custom field — paste any OpenRouter image gen model ID

To find current image gen models, click 🔍 Discover available models — queries the OpenRouter catalog live.

Recommended:

  • Gemini 3 Pro Image Preview (google/gemini-3-pro-image-preview) — default, $0.04/image, ~30s, native 16:9
  • Gemini 2.5 Flash Image (Nano Banana) (google/gemini-2.5-flash-image) — $0.02/image, ~15s, slightly lower quality

Note: OpenAI’s gpt-image-1 is not currently supported because it uses a different API endpoint (/v1/images/generations instead of chat completions).

Prompt template

The default prompt is editable in Settings → Image generation → Prompt par défaut. Placeholders supported:

PlaceholderReplaced by
{TITRE_ARTICLE} / {title}Article title
{CATEGORIE} / {topic}Primary category name
{RESUME_ARTICLE} / {excerpt}First 40 words of content
{date}Current month + year (e.g., “May 2026”)
{blog_name}WordPress site name

The default prompt is a tested template that produces editorial-style 16:9 images for blog featured use. Click ↺ Default prompt to reset.

Logo overlay (PHP composition)

Two strategies for adding your brand logo:

The plugin generates the image WITHOUT a logo, then composites your logo on top using Imagick (or GD as fallback). Result is pixel-perfect and doesn’t risk the AI drawing a fake logo.

Settings:

  • Logo overlay PHP: enable
  • Position: bottom-right (default), bottom-left, top-right, top-left, center
  • Size: 5-30 % of image width (default 15 %)
  • Custom logo: upload PNG/WebP/JPEG up to 2 MB; falls back to default LWS-white.png if removed

Strategy B — Logo in prompt (multimodal)

The plugin sends your logo as a visual reference to the model + asks it to render the logo in-image. Riskier (AI may draw a different logo) but produces more natural integration.

Setting: Mention du logo dans le prompt = enabled.

Combined

You can enable BOTH — but you might get double logos (AI-rendered + PHP overlay on top). Recommended: enable PHP overlay only.

Quality vs. cost

SettingQualitySpeedCost
Gemini Pro Image + PHP overlay⭐⭐⭐⭐⭐~30s$0.04
Gemini Flash + PHP overlay⭐⭐⭐⭐~15s$0.02
Gemini Pro + logo in prompt⭐⭐⭐⭐ (variable)~30s$0.04

For most blogs: Gemini 3 Pro Image Preview + PHP overlay = best balance.

Output

Generated images are:

  • Resized to 1920×1080 (Full HD 16:9) using Lanczos filter (Imagick) or bicubic (GD fallback)
  • Encoded as WebP, quality 85 (~150-300 KB per image)
  • Stored in WP media library with metadata:
    • post_title = article title
    • post_excerpt (caption) = “Image generated by [your blog name]” (no AI mention by default)
    • _wpsp_generated = 1
    • _wpsp_generated_for = post ID
    • _wpsp_generated_at = timestamp

Regenerating

If you don’t like a generated image:

  1. Delete the current featured image (in WP Media Library or the post)
  2. From the post editor metabox: click 🎨 Regenerate AI image
  3. New variant produced from the same prompt (each call is non-deterministic)

Troubleshooting

  • “Image too small / blurry”: model may have rendered at native 1024×1024. Check that image_config.aspect_ratio=16:9 is in the API call (it is by default in our integration). Try Gemini Pro Image Preview which renders natively in 16:9.
  • “AI draws a fake logo”: disable “Logo in prompt”, keep PHP overlay only. Add to your prompt: “NEGATIVE INSTRUCTIONS: do NOT generate any logo, watermark or brand mark in the image.”
  • “Double logos visible”: you have both strategies enabled. Disable “Logo in prompt”.

See Troubleshooting → OpenRouter errors for API-level issues.

What’s next?