Public
Remixed
Demo: summary vs summary_large_image OG/Twitter card previews
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

og-card-demo

A tiny demo showing the difference between the two Twitter/OG link-preview card types: summary (small square thumbnail) vs summary_large_image (full-width banner).

The only tag that flips between them is:

<meta name="twitter:card" content="summary" /> <!-- vs --> <meta name="twitter:card" content="summary_large_image" />

Routes

RouteWhat it is
/Explainer with a side-by-side mockup of both cards + a cheat sheet
/summaryLive page with twitter:card=summary and a 1:1 image
/summary-large-imageLive page with twitter:card=summary_large_image and a 1.91:1 image
/og/summary.svgGenerated 600×600 (1:1) OG image
/og/wide.svgGenerated 1200×630 (1.91:1) OG image

Files

index.tsx        Hono app: home page + two live demo pages + OG image routes
CardPreview.tsx  Visual mockup of how each card unfurls in a feed
og-image.tsx     Dynamically generated SVG OG images (square + wide)

How to actually see the difference

The cards on / are HTML mockups. To see how real crawlers render the two live pages, paste their URLs into a card validator:

Rendering mermaid diagram...

Note on SVG images

The OG images here are SVG, which keeps the demo dependency-free. Most platforms (Slack, iMessage, Discord) and validators render them fine, but X/Twitter itself prefers PNG/JPEG for og:image. If you're building a real site, generate a PNG at 1200×630 (e.g. with @vercel/og / Satori) instead of an SVG.

Cheat sheet

summarysummary_large_image
LayoutSmall square thumb beside textBig banner above text
Image ratio1:11.91:1
Recommended size≥ 144×1441200×630
Best forText-first content, logos, avatarsImage-first content, launches, art

Remix this val to make it your own.