A share card is the same layout with different words in it. That makes it a template problem rather than an image problem: store the layout once, and every page needs only a URL that fills it in. Nothing renders on your server, and there are no image files to write, name, invalidate or back up.
Store the card once
Templates are HTML with {{ placeholders }}. Anything a browser can draw works, including web fonts and CSS gradients.
Create the template. You do this once, not per page.
curl -X POST https://api.ironfang.uk/renderwolf/v1/templates \
-H "Authorization: Bearer if_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "og-card",
"html": "<body style=\"background:#0a0a0f;color:#fff;font:700 64px sans-serif;padding:80px\">{{title}}</body>",
"width": 1200,
"height": 630
}'1200x630 is the size every major network agrees on. The response carries the template id you use below.
Mint one URL per page
A signed URL carries the variables and a signature, so it can be public without being forgeable. Ask for ttl_hours: 0 and it never expires - which is what you want in a meta tag, because a crawler may come back months later.
curl -X POST https://api.ironfang.uk/renderwolf/v1/sign \
-H "Authorization: Bearer if_live_..." \
-H "Content-Type: application/json" \
-d '{
"kind": "image",
"template": "TEMPLATE_ID",
"vars": { "title": "Why we own our hardware" },
"ttl_hours": 0
}'Put it in the page
<meta property="og:image" content="https://api.ironfang.uk/renderwolf/v1/r/0/a1b2...">
<meta name="twitter:card" content="summary_large_image">Social crawlers fetch that URL directly. Your server is never in the path, so a burst of shares costs you nothing and cannot slow your site down.
Changing the design later
That is the property worth having. Generated image files decay: you change the design, and every card you rendered last year still shows the old one until you find and re-run whatever made them.
