Closed (fixed)
Project:
AI +
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Jun 2026 at 01:08 UTC
Updated:
24 Jun 2026 at 01:25 UTC
Jump to comment: Most recent
AI image generation (the _generate syntax on media reference fields) ran whenever the AI requested it, with no way to turn it off. A site could not disable it short of removing the field handler, and an individual editor could not opt out, so every request spent a text_to_image (Imagen) provider call even when the user only wanted layout or text changes.
Generated images also had no shape control: every image used the provider's default aspect ratio regardless of whether it was a full-width hero or a square thumbnail. Finally, the generation write path created media and wrote fields without checking the browsing user's access.
ImageGenerationGate, which ANDs a site-wide master switch (ai_plus.settings.image_generation_enabled, default on) with a per-user preference (navigation_plus EditorSettings, key ai_plus.generate_images, default on). Generation runs only when both are on.DeferredOperation. It returns a BlueprintWarning so the AI tells the user generation was off and how to re-enable it. Remediation differs by level: a site-wide switch needs an administrator, a per-user toggle the editor can flip themselves._generate syntax gains an optional aspect_ratio (1:1 / 4:3 / 16:9), validated by the handler and honoured by the processor, including across the prompt-rewrite retry.ai_plus.image_generation_gate (ImageGenerationGate)._generate field-handler guidance now documents the optional aspect_ratio and how to choose it.BlueprintWarning (returned when generation is off) and BlueprintAccessChecker (write-path access checks), and navigation_plus EditorSettings (per-user preference).ai_plus.settings.image_generation_enabled (boolean, default true), with matching config schema.
Comments
Comment #3
tim bozeman commented