The Template
If you already have Open Graph tags, add one line:
<meta name="twitter:card" content="summary_large_image" />If you want the full set with nothing left to fallbacks:
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@yourhandle" />
<meta name="twitter:title" content="Your Page Title" />
<meta name="twitter:description" content="One or two sentences about this page." />
<meta name="twitter:image" content="https://example.com/images/social-card.png" />
<meta name="twitter:image:alt" content="A short description of the image" />Every Twitter Card Tag
| Tag | Required | Limit | Falls back to |
|---|---|---|---|
twitter:card | Yes | summary, summary_large_image, app or player | Nothing |
twitter:title | Yes | 70 characters | og:title |
twitter:description | No | 200 characters | og:description |
twitter:image | No | Under 5 MB. JPG, PNG, WEBP or GIF | og:image |
twitter:image:alt | No | 420 characters | Nothing |
twitter:site | No | The site's @username | Nothing |
twitter:creator | No | The author's @username | Nothing |
summary vs. summary_large_image
summary_large_image puts a large image across the full width of the post. It's the one most sites want. summary shows a small square thumbnail next to the title and description. Use it when you don't have a good wide image.
If you leave twitter:card out, X may still build a small summary card when the page has og:type, og:title and og:description. You won't get the large image without asking for it.
Twitter Card Image Sizes
| Card type | Recommended | Ratio | Minimum | Maximum |
|---|---|---|---|---|
| summary_large_image | 1200x600 | 2:1 | 300x157 | 4096x4096, 5 MB |
| summary | 600x600 | 1:1 | 144x144 | 4096x4096, 5 MB |
A 1200x630 Open Graph image works for the large card. X trims a few pixels from the top and bottom. Only the first frame of an animated GIF is used, and SVG isn't supported. More in the OG image size guide.
Common Mistakes
- Using property= on every tag. X's docs use
name=fortwitter:tags. It toleratesproperty=, but other parsers don't always. - A typo in the card type.
summary-large-imagewith hyphens does nothing. It's underscores. - Blocking Twitterbot. If robots.txt blocks the page or the image, there's no card.
- Forgetting the @.
twitter:sitewants@yourhandle, not a profile URL.
Frequently Asked Questions
What Twitter card tags do I actually need?
Just twitter:card if the page already has og:title, og:description and og:image. X falls back to those. Set twitter:card to summary_large_image for the big image.
What is summary_large_image?
It's the twitter:card value that shows a large image across the full width of the post, instead of the small square thumbnail the summary card uses. Most sites should use it.
What is the Twitter card image size?
A 2:1 image such as 1200x600 for summary_large_image, with a 300x157 minimum. A 1200x630 Open Graph image works too, since X only trims a few pixels. Summary cards use a square image of at least 144x144. Both top out at 4096x4096 pixels and 5 MB.
Do Twitter Card tags still work now that it's called X?
Yes. The tags still use the twitter: prefix, the card types are the same, and the crawler is still called Twitterbot.