OG Images
Links:
- https://og-playground.vercel.app/
- https://edge-runtime.vercel.app/cli
- https://vercel.com/docs/concepts/functions/edge-functions/og-image-api
- https://vercel.com/docs/concepts/functions/edge-functions/edge-functions-api
For a looping video card, put a 1200×630 mp4 at public/content/<slug>/og.mp4
and point img.ogVideo at it. The generated image stays its still frame.
img:
ogVideo: /content/my-post/og.mp4
This post has one. Share it on Discord or X to see it loop.
It emits og:video for Discord, Telegram, and iMessage. X needs a
twitter:site handle for player cards. X_HANDLE in src/lib/siteMeta.tsx
ships as the template author’s, so replace it with your own handle, or set it to
undefined to drop twitter:site and keep summary_large_image. With a
handle, posts with a video also get an X player card that loops it on a
generated /og/player/<post>/ page.
You can test your social cards with
- Facebook Sharing Debugger — https://developers.facebook.com/tools/debug/
- Twitter Card Validator — https://cards-dev.twitter.com/validator
- Image Preview doesn’t work there anymore, so I’m using Bannerbear’s Twitter Card Preview Tool