Generate Social Cards for Every Page
Stop sharing the same generic preview image. Render unique, branded social cards from one HTML template — sized for Twitter, LinkedIn, Facebook, Instagram, and Slack — and embed them with a single hosted URL.
The Problem
Every link shared on social media shows a preview card. Generic or missing cards mean lower click-through rates. Generating a unique, correctly-sized card for thousands of pages — and then hosting all those images — is automation most teams don't have.
The Solution
Design one HTML template with {{placeholders}}, then render the same card at each network's required dimensions by changing only width and height per call — 1200×630 for Twitter, LinkedIn, and Facebook; 1200×1200 for Instagram; 1080×1920 for a story. Rendex fills the template server-side with Mustache and returns each sized image, so a single design covers every platform without a separate file or design tool. (Prefer a signed URL to paste straight into <meta twitter:image> instead of storing files? Use the hosted OG image API — /v1/render/link.)
See it in action


Get Started in Minutes
import Rendex from "@copperline/rendex";
import { writeFileSync } from "fs";
const rendex = new Rendex("YOUR_API_KEY");
// Design the card ONCE with {{placeholders}}; render one per page with data.
const template = `<div style="width:100%;height:100%;display:flex;padding:48px;
background:#0f172a;font-family:system-ui;color:white;">
<div style="display:flex;flex-direction:column;justify-content:space-between;">
<div style="font-size:16px;color:#94a3b8;">{{category}}</div>
<h1 style="font-size:48px;margin:0;line-height:1.2;">{{title}}</h1>
<div style="font-size:18px;color:#94a3b8;">{{author}} · {{date}}</div>
</div>
</div>`;
const { image } = await rendex.screenshot({
html: template,
data: { category: "Blog Post", title: "Edge Rendering 101", author: "Dana Okafor", date: "May 26, 2026" },
format: "png",
width: 1200,
height: 630,
});
writeFileSync("card.png", Buffer.from(image));// One template, every network's required size — change only width/height.
const platforms = [
{ name: "landscape", width: 1200, height: 630 }, // Twitter, LinkedIn, Facebook
{ name: "square", width: 1200, height: 1200 }, // Instagram feed
{ name: "story", width: 1080, height: 1920 }, // Instagram / TikTok story
];
const data = { category: "Blog Post", title: post.title, author: post.author, date: post.date };
for (const p of platforms) {
const { image } = await rendex.screenshot({
html: template, // the SAME {{...}} template as above
data,
format: "png",
width: p.width,
height: p.height,
});
writeFileSync(`card-${p.name}.png`, Buffer.from(image));
}from rendex import Rendex
from pathlib import Path
rendex = Rendex("YOUR_API_KEY")
# Render the same card at each platform's dimensions.
data = {"category": "Blog Post", "title": post.title, "author": post.author, "date": post.date}
for name, w, h in [("landscape", 1200, 630), ("square", 1200, 1200), ("story", 1080, 1920)]:
result = rendex.screenshot(html=template, data=data, format="png", width=w, height=h)
Path(f"card-{name}.png").write_bytes(result.image)100 free API calls/month — no credit card required. Get your API key and start building.
Built for This Use Case
Dynamic Data Templating
Store one HTML template with {{title}}, {{author}}, and more. Pass data per page — Rendex fills it server-side with Mustache.
Every Platform's Exact Size
1200×630 for Twitter, LinkedIn & Facebook; 1200×1200 for Instagram; 1080×1920 for a story. Render the same design at each network's required dimensions by changing only width and height — one card, every aspect ratio.
One Design, No Redesigns
Use width:100% / height:100% on the card so a single template reflows cleanly into a landscape, square, or vertical frame — no separate layout to maintain per network.
Fan Out Across Your Pages
Loop your content collection and render a full set of sized cards per page with concurrent calls — available on every plan, including Free.
Full Branding Control
Design with HTML and CSS: web fonts, gradients, logos, and profile photos from external URLs all render before capture.
Start Free, Scale as You Grow
100 calls/month free. Starter at $69/mo for 10K calls (or $58/mo billed annually — 2 months free). Pro at $179/mo for 100K calls.