How to Create AI-Generated Testimonial Graphics
Generate professional testimonial graphics from review text using AI.
Jay Banlasan
The AI Systems Guy
An ai testimonial graphic generator for social proof turns raw review text into shareable, professional visuals. I build these for businesses sitting on hundreds of testimonials that never get used because turning text into graphics is tedious. The system takes the quote, formats it beautifully, and outputs ad-ready or social-ready images.
Real testimonials in ads outperform stock creative. This makes them easy to produce at scale.
What You Need Before Starting
- Customer testimonials or reviews (text, name, optional photo)
- Python 3.8+ with an image generation API and Pillow
- Brand guidelines (colors, fonts)
- Output size specifications for your ad platforms
Step 1: Structure Testimonial Data
def prepare_testimonial(text, author, role="", company="", rating=5):
if len(text) > 200:
text = truncate_to_sentence(text, 200)
return {
"quote": text,
"author": author,
"role": role,
"company": company,
"stars": rating,
"display_name": f"{author}, {role}" if role else author
}
def truncate_to_sentence(text, max_length):
if len(text) <= max_length:
return text
truncated = text[:max_length]
last_period = truncated.rfind(".")
if last_period > max_length * 0.5:
return truncated[:last_period + 1]
return truncated.rsplit(" ", 1)[0] + "..."
Step 2: Generate Testimonial Graphics
from openai import OpenAI
client = OpenAI()
def generate_testimonial_graphic(testimonial, brand_config, style="clean"):
stars = "★" * testimonial["stars"] + "☆" * (5 - testimonial["stars"])
prompt = f"""Create a professional testimonial/review graphic.
Quote: "{testimonial['quote']}"
Author: {testimonial['display_name']}
Rating: {stars}
Design:
- Clean white or light background
- Quote text in large, readable font
- Author name below in smaller text
- Star rating displayed visually
- Subtle quote marks or decorative element
- Primary accent color: {brand_config['colors']['primary']}
- Professional, trustworthy feel
- No stock photos or fake faces"""
response = client.images.generate(model="gpt-image-1", prompt=prompt, size="1024x1024", quality="high")
return response.data[0].url
Step 3: Batch Generate from Review Data
def batch_testimonial_graphics(reviews, brand_config, limit=10):
results = []
for review in reviews[:limit]:
testimonial = prepare_testimonial(
text=review["text"],
author=review["author"],
rating=review.get("rating", 5)
)
url = generate_testimonial_graphic(testimonial, brand_config)
results.append({"testimonial": testimonial, "image_url": url})
return results
Step 4: Create Multiple Formats
from PIL import Image
import requests
from io import BytesIO
def export_testimonial_sizes(image_url, output_prefix):
resp = requests.get(image_url)
img = Image.open(BytesIO(resp.content))
formats = {
"feed": (1080, 1080),
"story": (1080, 1350),
"ad": (1080, 1080),
"linkedin": (1200, 627),
}
paths = {}
for name, size in formats.items():
resized = img.resize(size, Image.LANCZOS)
path = f"output/{output_prefix}_{name}.png"
resized.save(path)
paths[name] = path
return paths
Step 5: Track and Organize
def save_testimonial_asset(testimonial, image_paths, source_platform):
conn = sqlite3.connect("testimonials.db")
for format_name, path in image_paths.items():
conn.execute("""
INSERT INTO testimonial_assets (quote, author, format, image_path, source, created_at)
VALUES (?, ?, ?, ?, ?, datetime('now'))
""", (testimonial["quote"], testimonial["author"], format_name, path, source_platform))
conn.commit()
What to Build Next
Add automatic testimonial selection. Score testimonials by specificity, emotion, and result mentions. "Increased revenue 40% in 3 months" is a stronger testimonial than "Great service, would recommend." Prioritize the ones with concrete outcomes.
Related Reading
- AI in Paid Advertising: The Complete Overview - testimonial graphics in ad campaigns
- AI for Creative Strategy and Testing - testing testimonial formats for performance
- The One Person Company Is Here - scaling social proof creation without a design team
Want this system built for your business?
Get a free assessment. We will map every system your business needs and show you the ROI.
Get Your Free Assessment