Twitter Card: Tags, Image Size and How to Test It
A Twitter card is the preview X (formerly Twitter) shows when someone posts your link: an image, plus the page details. You control it with a few twitter: meta tags, and X falls back to your Open Graph tags for anything you leave out.
If your links show up as a plain URL or a tiny square, the card tags are usually the problem. In this post, I'll show you the card types, the exact tags to add, the image sizes that work, and how to test it now that X's own validator no longer shows previews. Let's get into it.
The Twitter Card Tags
Here's the full set for a big image card:
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Your post title">
<meta name="twitter:description" content="One or two sentences about the page.">
<meta name="twitter:image" content="https://example.com/share-image.png">
<meta name="twitter:image:alt" content="Describe the image">
<meta name="twitter:site" content="@yourhandle">
One thing worth knowing: only twitter:card is really required if you already have Open Graph tags. X uses og:title, og:description and og:image when the twitter: versions are missing. See the OG tags every page needs.
Twitter Card Types
- summary_large_image: a wide image above the link. This is what you want for blog posts and most pages.
- summary: a small square thumbnail next to the text. It's also what you can end up with if
twitter:cardis missing. - player and app: special cards for video players and app installs that most sites never need.
Twitter Card Image Size
- Large image card: use 1200 by 630. X shows it at roughly a 2:1 ratio, so keep important details away from the top and bottom edges.
- Summary card: a square image, at least 144 by 144.
- File: JPG, PNG, WebP or GIF (only the first frame is used), under 5 MB, from a public https URL.
Using 1200 by 630 means one image works on X, Facebook and LinkedIn. More on that in the best WordPress featured image size.
How Cards Look on X Now
X changed large cards a while back: they show the image with your domain over it, and the headline is no longer printed under the image. That makes the image itself do all the work. If your share image is just a photo, nobody can tell what the post is about. An image with the post title written on it fixes that.
How to Test Your Twitter Card
X's Card Validator no longer shows a preview, so testing means posting and hoping. Instead, paste your URL into our free OG image checker. It shows the X large and summary previews, plus Facebook, LinkedIn and iMessage, and flags a missing twitter:card or an image that's too small.
X also caches cards. After fixing your tags, a link you already posted may keep its old card for a while. Adding a harmless query string like ?v=2 to the URL makes X fetch it fresh.
Twitter Cards in WordPress
Yoast SEO, Rank Math, All in One SEO and most other SEO plugins output twitter:card for you and reuse your featured image. Without an SEO plugin, the free MightyShare plugin adds the OG and X image tags.
And since X now relies on the image alone, MightyShare generates a 1200 by 630 card for every post with your title, colors and logo right on the image, automatically. The first 50 images every 30 days are free. Try it free.