Documentation Index Fetch the complete documentation index at: https://mintlify.com/darkzOGx/youtube-automation-agent/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Thumbnail Designer Agent is your AI-powered graphic designer that creates professional, eye-catching YouTube thumbnails optimized for maximum click-through rates. It uses design psychology, color theory, and proven thumbnail patterns to generate thumbnails that stand out in search results and suggested videos.
What It Does The Thumbnail Designer Agent analyzes your script content, selects optimal design elements, and generates production-ready thumbnails with proper text overlays, composition, and YouTube optimization.
Key Features
Smart Design Concepts Generates design concepts tailored to content type
Text Optimization Creates impactful text overlays with proper sizing and contrast
Color Psychology Applies color schemes optimized for engagement
YouTube Optimization Ensures proper dimensions, file size, and format
Design Templates
The agent uses 5 specialized design templates:
Tutorial
Explainer
List/Countdown
Review
Story
Style : Clean and professionalElements : Step numbers, arrows, progress indicatorsColors : Blue, white, green (trust and clarity)Emotion : Helpful and educationalthumbnail-designer-agent.js
tutorial : {
style : 'clean' ,
elements : [ 'step numbers' , 'arrows' , 'progress indicators' ],
colors : [ 'blue' , 'white' , 'green' ],
emotion : 'helpful'
}
Style : Informative and curiousElements : Icons, diagrams, question marksColors : Purple, yellow, white (curiosity and attention)Emotion : Curious and intriguingthumbnail-designer-agent.js
explainer : {
style : 'informative' ,
elements : [ 'icons' , 'diagrams' , 'question marks' ],
colors : [ 'purple' , 'yellow' , 'white' ],
emotion : 'curious'
}
Style : Bold and excitingElements : Large numbers, countdown visuals, highlightsColors : Red, yellow, black (urgency and excitement)Emotion : Exciting and engagingthumbnail-designer-agent.js
list : {
style : 'numbered' ,
elements : [ 'large numbers' , 'countdown' , 'highlights' ],
colors : [ 'red' , 'yellow' , 'black' ],
emotion : 'exciting'
}
Style : Analytical and comparativeElements : Product images, rating stars, vs symbolsColors : Orange, gray, white (analytical tone)Emotion : Analytical and trustworthythumbnail-designer-agent.js
review : {
style : 'comparative' ,
elements : [ 'product image' , 'rating stars' , 'vs symbol' ],
colors : [ 'orange' , 'gray' , 'white' ],
emotion : 'analytical'
}
Style : Dramatic and emotionalElements : Faces, emotional expressions, journey pathsColors : Dark blue, gold, white (drama and premium)Emotion : Intriguing and captivatingthumbnail-designer-agent.js
story : {
style : 'dramatic' ,
elements : [ 'faces' , 'emotion' , 'journey path' ],
colors : [ 'dark blue' , 'gold' , 'white' ],
emotion : 'intriguing'
}
Core Methods
generateThumbnail()
Main method that orchestrates thumbnail creation.
thumbnail-designer-agent.js
async generateThumbnail ( script ) {
this . logger . info ( `Generating thumbnail for: ${ script . title } ` );
// Generate thumbnail concept
const concept = await this . generateConcept ( script );
// Create thumbnail prompt for AI generation
const prompt = await this . createPrompt ( concept );
// Generate base thumbnail
const thumbnailPath = await this . createThumbnail ( concept );
// Add text overlay
const finalThumbnail = await this . addTextOverlay ( thumbnailPath , concept );
// Optimize for YouTube
const optimizedThumbnail = await this . optimizeForYouTube ( finalThumbnail );
const thumbnailData = {
path: optimizedThumbnail ,
concept ,
prompt ,
dimensions: { width: 1280 , height: 720 },
fileSize: await this . getFileSize ( optimizedThumbnail ),
createdAt: new Date (). toISOString ()
};
await this . db . saveThumbnail ( thumbnailData );
return thumbnailData ;
}
generateConcept()
Creates a design concept based on content type and script analysis.
thumbnail-designer-agent.js
async generateConcept ( script ) {
const concepts = {
tutorial: {
style: 'clean' ,
elements: [ 'step numbers' , 'arrows' , 'progress indicators' ],
colors: [ 'blue' , 'white' , 'green' ],
emotion: 'helpful'
},
// ... other templates
};
const baseConcept = concepts [ script . metadata ?. strategy ?. contentType ?. toLowerCase ()]
|| concepts . explainer ;
return {
title: this . formatThumbnailTitle ( script . title ),
style: baseConcept . style ,
primaryText: this . extractPrimaryText ( script . title ),
secondaryText: this . generateSecondaryText ( script ),
elements: baseConcept . elements ,
colors: {
primary: baseConcept . colors [ 0 ],
secondary: baseConcept . colors [ 1 ],
accent: baseConcept . colors [ 2 ]
},
emotion: baseConcept . emotion ,
composition: this . selectComposition (),
effects: this . selectEffects ()
};
}
Extracts the most impactful words for the thumbnail.
thumbnail-designer-agent.js
extractPrimaryText ( title ) {
// Extract most impactful words
const impactWords = [ 'ultimate' , 'complete' , 'secret' , 'truth' ,
'how' , 'why' , 'best' , 'top' , 'guide' , 'master' ];
const titleWords = title . toLowerCase (). split ( ' ' );
const foundImpactWords = titleWords . filter ( word => impactWords . includes ( word ));
if ( foundImpactWords . length > 0 ) {
return foundImpactWords [ 0 ]. toUpperCase ();
}
// Extract numbers if present
const numbers = title . match ( / \d + / );
if ( numbers ) {
return numbers [ 0 ];
}
// Use first significant word
return titleWords . find ( word => word . length > 4 )?. toUpperCase () || 'WATCH' ;
}
The agent prioritizes power words and numbers because they statistically perform better in thumbnails, drawing the eye and creating curiosity.
Text Overlay System
The agent creates professional text overlays with proper styling:
thumbnail-designer-agent.js
async addTextOverlay ( imagePath , concept ) {
const outputPath = path . join ( __dirname , '..' , 'uploads' , 'thumbnails' ,
`thumbnail_final_ ${ Date . now () } .png` );
// Create text overlay SVG
const textSvg = `
<svg width="1280" height="720">
<style>
.primary {
fill: ${ concept . colors . accent === 'white' ? 'white' : 'black' } ;
font-size: 120px;
font-weight: bold;
font-family: Arial, sans-serif;
text-anchor: middle;
}
.secondary {
fill: ${ concept . colors . accent } ;
font-size: 60px;
font-weight: bold;
font-family: Arial, sans-serif;
text-anchor: middle;
}
.shadow {
fill: black;
opacity: 0.5;
}
</style>
<!-- Shadow for readability -->
<text x="642" y="302" class="primary shadow"> ${ concept . primaryText } </text>
<text x="642" y="402" class="secondary shadow"> ${ concept . secondaryText } </text>
<!-- Main text -->
<text x="640" y="300" class="primary"> ${ concept . primaryText } </text>
<text x="640" y="400" class="secondary"> ${ concept . secondaryText } </text>
</svg>
` ;
const textOverlay = await sharp ( Buffer . from ( textSvg )). png (). toBuffer ();
await sharp ( imagePath )
. composite ([{
input: textOverlay ,
top: 0 ,
left: 0
}])
. toFile ( outputPath );
return outputPath ;
}
Text Styling Features
All text includes drop shadows for readability on any background
Text color automatically adjusts based on background for maximum contrast
Primary text: 120px, Secondary text: 60px (optimized for mobile viewing)
Text is centered for balanced composition across all devices
Composition Techniques
The agent uses proven composition techniques:
thumbnail-designer-agent.js
selectComposition () {
const compositions = [
'rule-of-thirds' , // Classic photography technique
'centered' , // Direct and impactful
'diagonal' , // Dynamic and energetic
'golden-ratio' , // Aesthetically pleasing
'symmetrical' // Balanced and professional
];
return compositions [ Math . floor ( Math . random () * compositions . length )];
}
Visual Effects
Optional effects enhance visual appeal:
thumbnail-designer-agent.js
selectEffects () {
return {
blur: Math . random () > 0.5 , // Background blur for depth
vignette: Math . random () > 0.7 , // Edge darkening for focus
glow: Math . random () > 0.6 , // Text glow for pop
shadow: true , // Always include text shadow
border: Math . random () > 0.8 // Occasional border accent
};
}
YouTube Optimization
Thumbnails are optimized for YouTube’s requirements:
thumbnail-designer-agent.js
async optimizeForYouTube ( imagePath ) {
const outputPath = path . join ( __dirname , '..' , 'uploads' , 'thumbnails' ,
`thumbnail_optimized_ ${ Date . now () } .jpg` );
// YouTube optimization: JPEG format, proper compression
await sharp ( imagePath )
. resize ( 1280 , 720 , {
fit: 'cover' ,
position: 'centre'
})
. jpeg ({
quality: 90 ,
progressive: true ,
optimizeScans: true
})
. toFile ( outputPath );
// Verify file size (YouTube limit is 2MB)
const stats = await fs . stat ( outputPath );
if ( stats . size > 2 * 1024 * 1024 ) {
// Re-compress if too large
await sharp ( imagePath )
. resize ( 1280 , 720 )
. jpeg ({ quality: 80 })
. toFile ( outputPath );
}
return outputPath ;
}
YouTube Requirements
Resolution 1280x720 pixels (16:9 aspect ratio)
File Size Under 2MB (typically 200-500KB)
Format JPEG or PNG (JPEG recommended)
Quality 90% JPEG quality for optimal balance
A/B Testing Support
Generate multiple thumbnail variants for testing:
thumbnail-designer-agent.js
async generateABVariants ( concept ) {
const variants = [];
// Variant 1: Different color scheme
const variant1 = { ... concept };
variant1 . colors = {
primary: concept . colors . secondary ,
secondary: concept . colors . primary ,
accent: concept . colors . accent
};
variants . push ( await this . createThumbnail ( variant1 ));
// Variant 2: Different text
const variant2 = { ... concept };
variant2 . primaryText = this . generateAlternativeText ( concept . primaryText );
variants . push ( await this . createThumbnail ( variant2 ));
// Variant 3: Different composition
const variant3 = { ... concept };
variant3 . composition = 'centered' ;
variants . push ( await this . createThumbnail ( variant3 ));
return variants ;
}
A/B testing thumbnails can significantly improve click-through rates. The agent makes it easy to generate multiple variants for testing.
Color Psychology
Colors are strategically selected based on emotional impact:
Blue
Red/Yellow
Purple
Green
Emotion : Trust, reliability, professionalismBest For : Tutorial videos, technical content, business topicsImpact : Creates sense of authority and expertise
Emotion : Urgency, excitement, energyBest For : List videos, breaking news, countdown contentImpact : Draws immediate attention, creates FOMO
Emotion : Curiosity, creativity, mysteryBest For : Explainer videos, “what is” content, mysteriesImpact : Stimulates curiosity and intrigue
Emotion : Growth, success, positive outcomesBest For : Success stories, how-to guides, improvement contentImpact : Suggests positive results and achievement
Thumbnail Concept Example
{
"title" : "Ultimate Guide to AI Technology..." ,
"style" : "informative" ,
"primaryText" : "ULTIMATE" ,
"secondaryText" : "MUST WATCH" ,
"elements" : [ "icons" , "diagrams" , "question marks" ],
"colors" : {
"primary" : "purple" ,
"secondary" : "yellow" ,
"accent" : "white"
},
"emotion" : "curious" ,
"composition" : "rule-of-thirds" ,
"effects" : {
"blur" : true ,
"vignette" : false ,
"glow" : true ,
"shadow" : true ,
"border" : false
}
}
Best Practices
Use 3-5 words maximum. The agent automatically extracts the most impactful words from your title.
The agent ensures text is readable on mobile devices by using high contrast and drop shadows.
If using custom images, faces perform 30% better. Consider incorporating facial expressions that match your content emotion.
While the agent varies designs, maintain some consistent elements (like color scheme or logo placement) across your channel.
Generation Time 3-8 seconds
Configuration Options
# Default thumbnail style (clean|bold|minimal|dramatic)
THUMBNAIL_STYLE = bold
# Enable AI image generation for backgrounds
USE_AI_BACKGROUNDS = true
# Text shadow opacity (0.0 - 1.0)
TEXT_SHADOW_OPACITY = 0.5
# JPEG quality (60-100)
THUMBNAIL_QUALITY = 90
Next Steps
SEO Optimizer Learn how thumbnails work with SEO optimization
Analytics Agent Track thumbnail click-through rate performance
Production Agent See how thumbnails integrate with video production
API Reference View complete API documentation