Ghost Auto Social Cards: One-Line Setup Guide
To auto-generate a social card for every Ghost post, point Ghost's og:image tag at a dynamic generator endpoint through Settings → Code injection. The endpoint reads each post's title and returns a branded 1200×630 card at request time — so every post ships a correct, unique social image with no per-post export and no design tool. With Social Card Studio it's a single snippet you paste once.
Does Ghost create social cards automatically?
Ghost emits the Open Graph and Twitter card meta tags on every post automatically — that part is done for you. What Ghost does not do is design a per-post image. If you don't set a feature image, or a specific Facebook/Twitter image in the post's meta-data panel, the og:image falls back to your publication's cover image. The result: every shared link shows the same picture, no matter the post.
That fallback is the gap. A dynamic generator closes it by building a unique, branded card from each post's title at the moment a platform scrapes the URL.
Why auto-generate instead of uploading one image per post?
Because the manual path doesn't scale, and a blank or repeated card costs you reach. An image is the single biggest lever on whether a shared link gets clicked.
A unique card per post also lets you put the headline in the image — and headlines do measurable work.
Consistent brand color across those cards compounds the effect over time.
Doing this by hand means opening a design tool, exporting at the right size, compressing, uploading, and setting the meta-data field — for every post, forever. Auto-generation does it at publish time, identically, every time.
Native Ghost cards vs. a dynamic generator
| Approach | Per-post image | Headline on card | Brand consistency | Setup effort |
|---|---|---|---|---|
| Ghost default (no image set) | No — repeats publication cover | No | Cover only | None |
| Manual upload per post | Yes, if you do the work | Only if you design it | Drifts over time | High, every post |
| Dynamic generator (code injection) | Yes, automatic | Yes, rendered from title | Enforced by template | One-time snippet |
The dynamic-generator row is the only one that gives you a unique, on-brand, headline-bearing card with effort that doesn't grow with your archive. For the underlying mechanics of wiring a CMS to a generator endpoint, see CMS Dynamic OG Images; for the Ghost-native tag behavior, see Ghost Social Cards.
How do I set it up in Ghost? (the one-line install)
The whole install is one snippet in code injection. Here's the shape of what goes in Settings → Code injection → Site Header:
<script>
// Rewrite og:image to a dynamic card built from this post's title.
(function () {
var title = document.querySelector('meta[property="og:title"]')?.content;
if (!title) return;
var url = "https://og.socialcardstudio.com/v1/og?token=YOUR_TOKEN"
+ "&title=" + encodeURIComponent(title);
var tag = document.querySelector('meta[property="og:image"]')
|| document.head.appendChild(
Object.assign(document.createElement("meta"),
{ setAttribute: function () {} }));
tag.setAttribute("property", "og:image");
tag.setAttribute("content", url);
})();
</script>
In practice you don't write this yourself — you generate a brand kit in Social Card Studio and copy the ready-made snippet, which already carries your token, template, and colors. The five steps:
- Confirm the tags exist. View source on a post; you'll see
og:image,og:title, andtwitter:cardalready rendered by Ghost. - Get your endpoint URL. Build a brand kit (logo, colors, default template) and copy the code-injection snippet.
- Paste into Site Header. Settings → Code injection. Save. It now applies to every post.
- Keep overrides. Any post with a custom Facebook/Twitter image set in Post settings → Meta data keeps it — the generator is the fallback.
- Validate. Run a live URL through the link-preview checker, then re-scrape on the platforms.
Why does file size matter for the generated card?
Dimensions decide whether the card fits the layout; file size decides whether it loads before a scraper or a phone gives up. Keep the rendered card lean.
A good generator handles this for you — rendering at 1200×630, compressing, and serving an absolute HTTPS URL, which is the format Facebook, LinkedIn, X, Discord, and Slack all expect. For the exact per-platform numbers, keep the social media image size cheat sheet handy.
The takeaway
Ghost gives you valid Open Graph tags but one static image. Point og:image at a dynamic generator through code injection and every post earns a unique, branded, headline-bearing 1200×630 card — set up once, applied to your whole archive. Building and serving that card for every Ghost post automatically is exactly what Social Card Studio does.
Frequently asked questions
How do I auto-generate social cards for every Ghost post?
Point Ghost's og:image tag at a dynamic generator endpoint using Settings → Code injection. The endpoint reads each post's title from the page and returns a branded 1200×630 card, so every post you publish gets a correct social image with no manual export. With Social Card Studio it's a single snippet you paste once.
Does Ghost create Open Graph images automatically?
Ghost emits the Open Graph and Twitter card meta tags automatically, but it does not design a per-post image. If you don't set a feature image or facebook image, the og:image falls back to your publication cover — the same picture on every share. A dynamic generator fills that gap by building a unique card per post.
Will auto-generated cards override images I set manually?
No, if you wire them carefully. Set the generator as the fallback and let Ghost's per-post Facebook/Twitter image fields win when present. Posts where you've chosen a custom card keep it; everything else gets an auto-built branded card instead of the repeated cover image.