Twitter Card とは、Twitter (X) でリンクが共有された際のプレビュー表示を制御するメタデータ仕様です。 OGP と併用して設定することで、Twitter 上でのリンクの視認性とクリック率を最大化できます。
Twitter Card には 4 つのタイプがあります。 Summary (小さな画像 + タイトル + 説明文)、Summary with Large Image (大きな画像 + タイトル + 説明文)、App (アプリのダウンロードカード)、Player (動画や音声の埋め込み) です。 Web ページのリンク共有では Summary with Large Image が最もクリック率が高く、推奨されます。
設定するメタタグは、twitter:card (カードタイプ)、twitter:title (タイトル)、twitter:description (説明文)、twitter:image (画像 URL) です。 twitter:title と twitter:description が未設定の場合、OGP の og:title と og:description がフォールバックとして使用されます。
Twitter Card の画像推奨サイズは、Summary with Large Image で 1200×628 ピクセル (アスペクト比 2:1)、Summary で 144×144 ピクセル以上です。画像のファイルサイズは 5MB 以下が必要です。設定後は Twitter Card Validator (cards-dev.twitter.com/validator) でプレビューを確認してください。