When a link is posted on X (formerly Twitter), it can appear as a bare URL or as a card with an image, a title and the site's domain. The card is what makes a link stand out in a busy timeline, and it is controlled by a few meta tags on the linked page.
This guide explains the card types X supports, when to choose each one, which tags you actually need, how X falls back to Open Graph tags, and how to check a card before you post.
What an X card is
An X card is a preview generated from twitter: meta tags in the page's <head>. X fetches the page when a link is first posted, reads the tags, and displays the card under the post.
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@example">
<meta name="twitter:title" content="How We Cut Our Cloud Bill Without Rewriting Code">
<meta name="twitter:description" content="Right-sizing, spot instances and one caching change.">
<meta name="twitter:image" content="https://www.example.com/img/cloud-costs.png">
<meta name="twitter:image:alt" content="Bar chart of monthly cloud costs falling">
Note that X uses the name attribute, while Open Graph uses property. Both are commonly accepted, but following each convention avoids surprises.
The card types
X has historically documented four card types. Two are relevant to ordinary web pages:
| Card | What it shows | Image shape | Best for |
|---|---|---|---|
summary |
Small square thumbnail beside the title and description | Square, at least 144 × 144 px | Profiles, product pages, links where the image is a logo or icon |
summary_large_image |
Large image across the full width of the post | 2:1, at least 300 × 157 px; 1200 × 628 works well | Articles, announcements, visual content |
The other two, app and player, are for promoting mobile apps and embedding media players, and need extra approval or set-up.
Which one to choose
Choose summary_large_image when you have a strong, relevant image and want the link to take up space. Choose summary when the only image you have is a logo, or when you prefer a compact card.
Keep in mind that on many X clients, large-image cards show only the image with the title and domain overlaid or beneath; the description may not be shown. With a summary card, the description plays a bigger role.
How X falls back to Open Graph
If twitter:title, twitter:description or twitter:image are missing, X uses the equivalent Open Graph tags (og:title, og:description, og:image). So a site with good Open Graph tags only needs to add twitter:card to choose the card type.
Without twitter:card, X typically shows a small summary-style card at best. Add it explicitly if you want the large image.
Test a card with our tool
The Twitter Card Preview shows the card inside a mock post and checks the common rules.
- Open the Twitter Card Preview and choose the Card type: summary_large_image or summary.
- Enter twitter:title (a badge compares it with about 70 characters) and twitter:description (about 200).
- Add the twitter:image URL, or press Preview a local image to try a file that is not online yet.
- Write twitter:image:alt text describing the image for people using screen readers.
- Enter the Page URL (for the domain line), plus twitter:site (your brand account) and twitter:creator (the author) if relevant. The @ is added if you leave it out.
- Type a sample message in Post text inside the Post preview to see the card in context.
- Read the Checks: they cover an empty or long title, a long description, a missing or non-https image, and the recommended image size for the card type. Images must be under 5 MB in JPG, PNG, WEBP or GIF (first frame).
- Copy the Twitter card tags into your page head.
Other ways to check
Post it privately. X's own Card Validator no longer shows a visual preview of the card, so this is the most reliable check. Posting from a protected test account, or drafting a post and looking at the preview, shows the real card. The card may be cached after the first fetch.
Open Graph checks. Because X falls back to Open Graph, check those tags too, for example with the Open Graph Preview, which also includes an X large-image card.
View source. Confirm the tags are present in the server's HTML, not injected by JavaScript. X's crawler needs to see them without running scripts.
Tips and pitfalls
Absolute https image URLs
Relative paths and plain http addresses often fail. Use the full https:// URL.
Keep text in the safe area
Large-image cards may be cropped differently across apps. Keep important words and faces in the centre.
Write alt text
twitter:image:alt makes the card accessible. Describe what the image shows, not "image of".
Do not duplicate everything
If Open Graph tags are complete and identical, you can skip the matching twitter: tags and just set twitter:card. Generating both at once with the Open Graph Generator keeps them in sync.
Watch the post length
The post text itself has its own limit. The Twitter Character Counter checks it, counting links the way X does.
Frequently asked questions
What is the difference between summary and summary_large_image?
A summary card shows a small square thumbnail beside the text. A summary_large_image card shows a wide image across the post, which is more eye-catching for articles.
What size should a Twitter card image be?
For large-image cards, a 2:1 image of at least 300 × 157 pixels; 1200 × 628 is a common choice. For summary cards, a square of at least 144 × 144 pixels.
Do I need twitter: tags if I have Open Graph tags?
You need at least twitter:card to choose the card type. Title, description and image can fall back to Open Graph.
Why is my card not showing the image?
Check that the image URL is absolute and https, publicly accessible, under 5 MB, and in a supported format. Also check the tags are in the HTML the server sends.
Is the twitter:site tag required?
No. It links the card to your brand's account and is recommended, but a card works without it.