OGsmithStart free

Docs

Refreshing cached cards

Once a link has been shared, X, Slack, Discord and WhatsApp keep serving the image they cached the first time, and none of them offer a way to clear it. Facebook and LinkedIn have scraper tools; the rest do not. Every one of them keys the cache on the image URL alone, so the only reliable fix is a different URL.

That is what v is for. It never reaches the renderer, so two URLs that differ only in v produce the identical image, but a cache treats them as different resources:

<meta
  property="og:image"
  content="https://ogsmith.app/api/og?key=og_yourkey&title=My%20post&v=3"
/>

Your account carries a version number, shown in the dashboard under Cache refresh. It increments automatically whenever you change a brand default or your logo, because those edits leave published cards looking wrong without any warning. You can also bump it by hand from the same panel. Read it into your templates and every page you re-deploy picks up the new artwork:

const og = new URL("https://ogsmith.app/api/og");
og.searchParams.set("key", process.env.OGSMITH_KEY);
og.searchParams.set("title", post.title);
og.searchParams.set("v", process.env.OGSMITH_CACHE_VERSION);

Values are limited to 32 characters of A-Z a-z 0-9 . - _. A build ID or content hash works just as well as the account version if you would rather refresh per page. Signed URLs cover v like any other parameter, so re-sign after changing it.