
The tags
| Tag | Needed? | Notes |
|---|---|---|
| twitter:card | Yes | summary_large_image for a wide image, summary for a small square |
| twitter:title | Optional | Falls back to og:title |
| twitter:description | Optional | Falls back to og:description |
| twitter:image | Optional | Falls back to og:image |
| twitter:image:alt | Recommended | Alt text for the preview image |
| twitter:site | Optional | Your site's account handle |
Because of the fallbacks, a site with good Open Graph tags needs only one extra line: <meta name="twitter:card" content="summary_large_image">. Without it, X shows the small summary card or none at all.
Card types
Twitter card worked example
The post is invented. A site already prints a complete Open Graph set, described in adding Open Graph tags in WordPress, and wants a wide card on X with alt text and the site's handle. The minimum addition is the first line below; the full set is what an SEO plugin typically prints when its social settings are filled in. Note that twitter tags use name where Open Graph tags use property, as the cited markup reference shows.
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@exampletown">
<meta name="twitter:title" content="Why the town clock runs slow">
<meta name="twitter:description" content="A 140 year old escapement, a hot summer, and a repair that took three attempts.">
<meta name="twitter:image" content="https://example.com/wp-content/uploads/2026/09/town-clock-1200x630.jpg">
<meta name="twitter:image:alt" content="The town clock face with the minute hand at ten past">With the Open Graph set present, lines two to six repeat information X would have found anyway. They earn their place in two cases: when you want a different image or shorter title on X than on Facebook, and when you want the alt text, which has no Open Graph fallback in the cited markup reference. In our example the 1200 by 630 image is cropped toward 2:1 on the card, so the clock face sits in the centre and loses about 15 pixels top and bottom.
Image sizing
The large image card crops toward 2:1. A 1200 by 630 Open Graph image works well if the important content sits in the centre; see the safe zone in Open Graph image size. Keep the file under 5 MB and use JPG, PNG or WEBP. Animated GIFs show only the first frame.
Testing
View source
Confirm one twitter:card tag and a single og:image.
Check the image loads publicly
Open it in a private window over https.
Post a test
X's standalone card validator no longer previews cards, so draft a post with the link, or share it from a test account, and look at the preview in the composer.
Re-share after changes
X caches cards for a while; new posts pick up changes sooner than old ones.
Symptoms, causes and fixes
| Symptom | Cause | Fix |
|---|---|---|
| Link shows as plain text, no card | No twitter:card tag and no usable og tags, or the crawler was blocked | Add twitter:card; allow the Twitterbot user agent |
| Small square thumbnail | twitter:card set to summary, or a second tag overriding the first | Set summary_large_image; keep one twitter:card tag |
| Wrong image on X, right image on Facebook | twitter:image points at an old or different file | Remove twitter:image to inherit og:image, or correct it |
| Text cut off on the card | Title over about 70 characters or description over about 200 | Shorten the social title and description |
| Old card after a change | X's cache | Post a fresh link; old posts update later or never |
| Card appears for you, not for others | Image behind a login, a staging host, or an IP allowlist | Serve the image publicly over https |
In WordPress
SEO plugins usually output twitter tags alongside Open Graph and let you choose the default card type. If your share plugin also prints them, you may get two twitter:card tags; keep one source. The old product images on this domain showed Open Graph and twitter card settings side by side, a reminder that the two have always been configured together.
What goes wrong
- Two twitter:card tags with different values. One plugin prints summary, another summary_large_image. Which wins depends on order; remove one.
- Using property instead of name.
<meta property="twitter:card">is a common copy-paste error. Some parsers accept it; the cited reference specifies name. - An image over 5 MB. A full-size PNG export from a design tool often exceeds the limit and the card falls back to text. Export a JPG or WEBP at 1200 by 630.
- Alt text left empty. twitter:image:alt is the only place a preview image gets a description for screen readers. Fill it.
- A generated preview image with no disclosure. If the card image came from an image generator, the card itself carries no label; the options for saying so in the tags and the caption are in disclosing a generated preview image.
- Assuming the validator still works. The standalone validator stopped previewing cards; the composer preview and the Facebook debugger's tag list, described in Facebook showing the wrong image or share text, are the working tools.
Check it worked
- View source shows one twitter:card tag, using the name attribute, set to summary_large_image.
- twitter:image, if present, is an absolute https URL to a file under 5 MB; otherwise og:image is.
- twitter:image:alt carries a sentence that describes the picture.
- A draft post in the X composer shows a wide image card with the intended title.
- A test post from a second account shows the same card, which proves the image is public.
More on this topic sits in the Open Graph and link preview guides: start with adding Open Graph tags in WordPress, then Facebook showing the wrong image or share text.
Sources
- X Developer Platform, About X Cards (Internet Archive copy, May 2025)
- X Developer Platform, Cards markup reference (Internet Archive copy, May 2025)
- The Open Graph protocol
Questions
Do I need Twitter card tags if I have Open Graph tags?
You need twitter:card. The title, description and image fall back to your Open Graph tags.
What image size is best for a Twitter card?
A wide image around 1200 by 630 or 1200 by 600, with the key content centred, under 5 MB.
How do I test a Twitter card now?
Paste the link into the X composer or a test post and check the preview.
Why is my Twitter card not showing?
Usually the twitter:card tag is missing, the image is unreachable or over 5 MB, or the crawler was blocked. View source, open the image in a private window, then draft a fresh post to see the card.
Does twitter:card need the name or property attribute?
The cited markup reference uses name. Open Graph tags use property. Mixing them is a common cause of a card that some tools parse and X does not.
Hannah Voss, Editor. Checks every guide against a working WordPress install and the networks' current documentation. Last reviewed September 2026.
Related reading
- Adding Open Graph tags in WordPressAdd Open Graph tags to WordPress with an SEO plugin or theme code: the four required tags, image tags, per-post overrides, and how to avoid duplicate tags.7 min read
- Open Graph image size: 1200 by 630 and the safe zoneThe right Open Graph image size is 1200 by 630 pixels at a 1.91:1 ratio. Minimums, file limits, formats, and a centre safe zone for square crops.6 min read
- Click to tweet boxes: how to build them in WordPressBuild a click to tweet box in WordPress with a block or a simple link. Wording, the 280 character limit, how links are counted, and how to style the quote.5 min read
- Authorship tags for shared links: author, article:author and fediverse:creatorAdd authorship signals to link previews: the author meta tag, article:author, twitter:creator and fediverse:creator, with WordPress code and testing steps.6 min read