Theme overlays: attach logo/image to be reproduced on every slide #66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Allow a user to attach an image (e.g. a company logo) to a theme and specify where it should appear on every slide (e.g. top-right corner). The image is passed directly to the AI image generation model — no image compositing crates.
Approach
1. Theme markdown — overlay section
Add an
[overlays]block to the theme text:mode: copymeans the AI is instructed to reproduce the image exactly at that position.mode: stylekeeps the existing extract-style behaviour.2. Storage
Logo/overlay images are stored under
content/background/(already indexed byfind_background_files()). Alogos/subfolder is the natural home. No new infrastructure needed.3. Theme editor UI
When a user pastes or uploads an image in the theme editor, offer two options:
bg/logos/, inserts the overlay block into the theme textarea with position/size fields the user can adjustImages show inline in the editor as they do today.
4. Image generation — AI receives the logo
When generating a slide image, any overlay images referenced in the theme are read from disk and included as additional image inputs in the multimodal prompt (alongside the slide content and theme). The prompt instructs the model to place the logo exactly at the specified position and size.
The theme prompt wrapper is updated to say: "Place the following image exactly at [position] — do not alter or stylise it."
5. No compositing step
All reproduction is handled by the AI. No
imagecrate or post-processing pipeline.Files to touch
hero_slides_lib/src/generator.rs— pass overlay images to image generation prompthero_slides_lib/src/prompts/system_extract_theme_from_image.md— update theme extraction prompthero_slides_lib/src/prompts/generator_slide_image.md— add overlay placement instructionhero_slides_admin/static/js/dashboard.js— UI: paste → choose mode, insert overlay blockhero_slides_admin/templates/index.html— UI adjustments for overlay optionability to attach context e.g. logo to themeto Theme overlays: attach logo/image to be reproduced on every slide