Skip to content

Open Graph

Twitter cards on X: tags and testing

By Hannah Voss, Editor · Reviewed September 2026 · 3 min read

Quick answer

Twitter cards control how your links look on X. Add a twitter:card tag set to summary_large_image for a wide image preview; X falls back to your Open Graph title, description and image when the twitter tags are missing. Use an image with a 2:1 or 1.91:1 ratio, at least 300 by 157 pixels, and under 5 MB.

On this page
  1. The tags
  2. Card types
  3. Image sizing
  4. Testing
  5. In WordPress
  6. Questions

The tags

TagNeeded?Notes
twitter:cardYessummary_large_image for a wide image, summary for a small square
twitter:titleOptionalFalls back to og:title
twitter:descriptionOptionalFalls back to og:description
twitter:imageOptionalFalls back to og:image
twitter:image:altRecommendedAlt text for the preview image
twitter:siteOptionalYour 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 types01summary_large_imagewide image above title02summarysmall square thumbnail03player and app cardsspecial cases
Almost every blog post should use summary_large_image.

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

  1. View source

    Confirm one twitter:card tag and a single og:image.

  2. Check the image loads publicly

    Open it in a private window over https.

  3. 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.

  4. Re-share after changes

    X caches cards for a while; new posts pick up changes sooner than old ones.

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.

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.

Share this guide

Hannah Voss, Editor. Checks every guide against a working WordPress install and the networks' current documentation. Last reviewed September 2026.

  1. 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.3 min read
  2. 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.3 min read
  3. 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.3 min read