Twitter Card Meta Tags: twitter:card Syntax and Card Types
twitter:card syntax, card types, image limits and Open Graph fallback, from the last published X Cards docs. X no longer publishes them.
Twitter card meta tags are twitter: tags in the page head. They tell X, formerly Twitter, how to show a preview card when someone posts a link to the page. Add twitter:card to each page, and add Open Graph tags too, because X used them when a twitter: tag was missing.
Documentation status
X once documented Cards on its developer site. On October 22, 2026, the old Cards URLs on developer.x.com redirect to the home page of docs.x.com. The X for Websites section there covers embedded posts, buttons and widgets, but not Cards.
The facts on this page come from the last copies of X’s Cards pages in Arquivo.pt, the Portuguese web archive. The main sources are the markup reference, archived in December 2025, and the getting started guide, archived in February 2026. X does not say how it handles the tags today.
Syntax
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@example">
<meta name="twitter:title" content="Page title">
<meta name="twitter:description" content="One or two sentences about this page.">
<meta name="twitter:image" content="https://example.com/images/page.png">
<meta name="twitter:image:alt" content="A gray cat asleep on a keyboard">
Card tags use the name attribute. The getting started guide said that the X parser also reads tags with the property attribute, as Open Graph uses. Only one card type works on a page. If a page has more than one twitter:card tag, the last one wins.
Card types
twitter:card value |
Card |
|---|---|
summary |
Title, description and a thumbnail image |
summary_large_image |
Like summary, but with a large image |
app |
A card with a direct download link to a mobile app |
player |
A card that can play video, audio or other media |
Tags and Open Graph fallback
The getting started guide said that X first looks for the twitter: tag. If that tag is missing, X uses the matching Open Graph tag. If your page already has Open Graph tags, you need only twitter:card and the tags that you want to be different on X.
| Tag | What it holds | Fallback |
|---|---|---|
twitter:card |
The card type | og:type |
twitter:site |
The @username of the website | None |
twitter:creator |
The @username of the author | None |
twitter:title |
The title, at most 70 characters | og:title |
twitter:description |
The description, at most 200 characters | og:description |
twitter:image |
The image URL | og:image |
twitter:image:alt |
A text description of the image for people who cannot see it, at most 420 characters | og:image:alt |
The markup reference said that X can show a summary card when twitter:card is missing but og:type, og:title and og:description exist. The reference also listed tags for the app and player cards, such as twitter:player and twitter:app:id:iphone.
Image rules
The image file must be smaller than 5 MB. X accepted JPG, PNG, WEBP and GIF. X used only the first frame of an animated GIF, and it did not support SVG.
| Card | Aspect ratio | Size in pixels |
|---|---|---|
summary |
1:1. X crops the image to a square | 144 by 144 to 4096 by 4096 |
summary_large_image |
2:1 | 300 by 157 to 4096 by 4096 |
X asked for an image that is unique to the page. Do not use a generic image, such as your logo or an author photo.
Crawler, robots.txt and cache
X fetches the page and the image with its crawler, Twitterbot. The getting started guide said that the crawler follows Google’s robots.txt specification. If robots.txt blocks the page, X shows no card. If robots.txt blocks the image, X shows no image.
If your robots.txt blocks all other crawlers, you can still allow Twitterbot:
User-agent: Twitterbot
Disallow:
User-agent: *
Disallow: /
The guide also said that X caches the card content for 7 days after a post links to the page.
What the tags do not do
Twitter card tags do not do these things:
- They do not control indexing. Use the robots meta tag for that.
- They do not replace Open Graph. Facebook and LinkedIn document the Open Graph tags, not
twitter:tags. - They do not change a card that X already cached. The cache lasted 7 days, as stated in the old guide.