Share cards: the picture that arrives before your page does
· 4-minute read · Measurement and growth · by Direct Softworks
Paste a link into LinkedIn or Slack and the card is all anyone sees of the page. Ours is drawn per page, and drawing it had three traps, all silent.

A lot of people meet a page as a card before they meet it as a page. Somebody pastes the link into a LinkedIn post or a Slack channel, the platform fetches the URL, reads the Open Graph tags in the head, and draws a preview: an image, a title, a line of description, the domain. That preview decides whether anyone clicks.
For a long time every article on this blog unfurled with the same site-wide card. Share any post and it looked identical to the last one, which is a fine way to make a reader assume they have already seen it.
One renderer, drawn per page
The fix was to draw the card rather than ship it. Every page's card now comes from one function that takes a headline and returns a 1200 by 630 PNG: black, a dot-matrix texture that fades out toward one corner, our mark cropped by the right edge, and the headline set heavy across the top. The homepage, each article and each case study call it from their own opengraph-image.tsx, so the cards cannot drift apart, because there is only one of them.
Two decisions were deliberate.
The card replaces the article's cover image. A cover is whatever shape the author had to hand, and a share crops it to roughly 1.91 to 1, which usually leaves a detail of a screenshot. The headline is what makes someone click, so the headline is what the card shows. The article metadata deliberately sets no image of its own, because an explicit image there would win over the generated card and put the upload back.
No domain and no strapline on the card. LinkedIn, Slack and X already print the domain under the image. Every extra line on the card is one the platform draws twice.
Trap one: the texture that drew nothing
The cards are rendered with next/og, which uses Satori to turn JSX and a subset of CSS into SVG, and Resvg to rasterise it. The usual way to draw a dot grid is a tiled CSS background: a radial-gradient with a background-size. Satori accepts that. It then draws it at some tile sizes and silently draws nothing at others. Seven pixels gave us dots. Six and eight gave a plain black card, with no warning and no error.
It looks exactly like a stale dev server, and it is not one.
The fix was to stop asking the layout engine to paint texture. The dots are now a single SVG, a <pattern> under a gradient <mask>, passed in as an image data URI. An image goes straight to the rasteriser, which draws patterns and masks properly, so the density is a number in the code rather than a value that happened to work.
Trap two: what the engine does not have
There is no bold unless you bring it. The default font ships in one weight and bold is not synthesised, so fontWeight: 700 on its own renders as regular text. The whole design is a heavy headline, so the display face is vendored as a TTF file and handed over as a buffer. It sits in public/ for an unglamorous reason: that is the directory our container build copies verbatim, and a font anywhere else survives the build and then vanishes from the standalone output.
There is no text measurement either. Satori cannot measure a line and shrink it to fit, so the headline size steps down by character count: up to 30 characters it is set at 100 pixels, up to 55 at 82, and so on, each band chosen so that its longest title still breaks into at most four lines. Anything over 150 characters is cut. Crude, and entirely predictable, which is what an image rendered for a machine needs to be.
Trap three: the URL is not where you think
Next.js appends a short hash to the URL of a metadata image that lives under a route group. Our article cards sit under one, so the obvious path, the article URL plus /opengraph-image, is a 404, and the real image is at that path with a six-character suffix. The page's own og:image tag points at the right one, so the platforms never notice. You notice when you try to check a card by typing the URL you assumed it had.
Which leads to the only check that counts. Fetch the page, read the og:image it actually emits, and fetch that. Typechecking passes when the tag is missing, and a page rendered in a browser shows nothing of its card at all.
There is a fourth trap in the same family. In Next.js, a page that declares its own openGraph object replaces the parent's wholesale, image included, so a page can lose its card by adding one harmless-looking field.
The wider point
A share card is rendered by software, cropped by software, cached by platforms you do not control, and then shown to a person who has not yet decided to visit you. Every failure in that chain is silent: a missing layer, a missing tag, an image at a URL nobody checks.
The only defence is to look at what the platform actually receives. It is the same habit as reading what a crawler gets back rather than what your own browser shows you, and it costs one request per page.