Your next thumbnail, from the same layout.
quickthumb is a Python library for developers who publish recurring thumbnails and social images. Keep your layout in code, then pass in a new headline, episode number, or color to make the next image. Use Python functions or JSON specs in your content pipeline.
Get started · Browse recipes · API reference
This example turns one layout into three 1280 × 720 episode cards. It uses the base package and built-in font, with no asset downloads after installation.
| 12 | 13 | 14 |
|---|---|---|
Requires Python 3.11+. Run in a working directory outside the quickthumb checkout. Need a virtual environment? See Installation for Bash/Zsh and Windows setup. Then install:
python -m pip install quickthumbSave the complete example below as episode_cards.py, then run:
python episode_cards.pyOpen episode-12.png, episode-13.png, and episode-14.png in the same directory.
Each run overwrites these three files.
The sample titles stay in English so you can try it with the built-in font.
from quickthumb import Canvas, Stroke
INK = "#111111"
WHITE = "#FFFFFF"
def episode_card(episode, title, accent):
return (
Canvas(1280, 720)
.background(color=INK)
.shape("rectangle", position=(0, 0), width=1280, height=360, color=accent)
# The numeral stands on the band and crops at the top edge.
.text(
str(episode),
size=540,
color=INK,
# A stroke in the text color thickens the regular-weight built-in font.
effects=[Stroke(width=8, color=INK)],
position=(1240, 360),
align=("right", "bottom"),
letter_spacing=-10,
)
.text(
"THE BUILDER'S\nNOTEBOOK",
size=26,
color=INK,
effects=[Stroke(width=1, color=INK)],
position=(48, 44),
letter_spacing=1,
)
.text(
"EPISODE",
size=26,
color=INK,
effects=[Stroke(width=1, color=INK)],
position=(48, 330),
align=("left", "bottom"),
letter_spacing=1,
)
.text(
title,
size=136,
color=WHITE,
effects=[Stroke(width=2, color=WHITE)],
position=(48, 688),
align=("left", "bottom"),
max_width=1184,
max_height=290,
auto_scale=True,
balance_lines=True,
line_height=1.04,
)
)
episodes = [
(12, "Ship your first release", "#FF4B1F"),
(13, "Make room for better work", "#FFD400"),
(14, "Build less. Finish more.", "#4D8DFF"),
]
for episode, title, accent in episodes:
episode_card(episode, title, accent).render(f"episode-{episode}.png")Change a title or accent color
in episodes and run again to see the same layout with new content.
Test your longest titles before running a batch.
For other languages, choose a local font with the glyphs you need; see Text. The first-use guide explains how to adapt this layout.
- Separate content from layout. Reuse a Python function, or load a JSON spec from your pipeline.
- Fit changing titles. Set wrapping and fitting bounds, or use auto-layout groups for rows and columns.
- Check before export.
diagnose()flags common issues such as off-canvas layers, small text, and low contrast. It does not judge design quality; see diagnostic limits.
To reproduce a render, retain the assets, fonts, and rendering environment. See reproducibility requirements before expecting matching pixels across runs or machines.
| YouTube thumbnail | Commentary thumbnail | Podcast episode |
|---|---|---|
Explore the layouts and their source →
The base package exports PNG, JPEG, WebP, SVG, HTML, and GIF. PDF and PPTX need optional packages; MP4 and WebM need FFmpeg. Format support and visual behavior vary: see Installation and Exporting.
For multi-slide presentations and narrated video, see the Deck guide. For generated JSON specs, see the JSON & AI workflow.