AI Image Captioning and Overlay
detail.loadingPreview
Generates captions for images using Google Gemini and overlays them onto the image.
About This Workflow
This workflow leverages n8n's Langchain integration with Google Gemini to generate descriptive captions for images. It then uses the Edit Image node to calculate optimal positioning and apply the generated caption as an overlay on the original image. This is useful for automated content generation, watermarking, or adding context to images.
Key Features
- Image fetching via HTTP request.
- Image resizing for AI processing.
- Multimodal AI (Google Gemini) for caption generation.
- Structured output parsing for caption components.
- Dynamic positioning calculation for text overlay.
- Text overlay on images using Edit Image node.
- Support for custom prompts to guide AI captioning.
How To Use
- Import an Image: The
Get Imagenode fetches an image from a specified URL. Replace the example URL with your desired image source. - Resize Image: The
Resize For AInode prepares the image by resizing it to a suitable dimension for the AI model. - Generate Caption: The
Image Captioning Agentnode, using Google Gemini, generates a caption for the resized image. The prompt can be customized in theImage Captioning Agentnode's parameters. - Calculate Positioning: The
Calculate Positioningcode node determines the optimal placement for the caption text on the image, considering image dimensions and text length. - Merge Image & Caption Data:
Merge Image & CaptionandMerge Caption & Positionsnodes combine the image data with the generated caption and its calculated positioning. - Apply Caption to Image: The
Apply Caption to Imagenode draws a semi-transparent background rectangle and then overlays the generated caption text onto the image using the calculated positions and styles.
Apps Used
Workflow JSON
{
"id": "6c4ebd57-7e5a-4e60-9591-a74fff9acbbf",
"name": "AI Image Captioning and Overlay",
"nodes": 10,
"category": "Content Generation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 6c4ebd57-7e5a...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
Perplexity Research to HTML Web Page Generator
This workflow takes a research topic, generates structured content using AI, and converts it into a responsive HTML web page styled with Tailwind CSS.
The Recap AI - Bigfoot Video Generator
Automates the creation of YouTube videos featuring a character named 'Sam the Bigfoot' by generating scripts, scenes, and final video output.
Automated News-to-Blog Post Generation with Multilingual Metadata
This workflow automates the creation of SEO-optimized blog posts from news articles, including title, slug, and meta descriptions, with potential for multilingual content generation.