Skip to content

fix: add missing meta tags for Twitter/X social card images#818

Merged
aaronpowell merged 1 commit intostagedfrom
x-social-cards
Feb 25, 2026
Merged

fix: add missing meta tags for Twitter/X social card images#818
aaronpowell merged 1 commit intostagedfrom
x-social-cards

Conversation

@aaronpowell
Copy link
Copy Markdown
Contributor

Summary

Social card images display correctly on LinkedIn but not on X (Twitter). This adds the missing meta tags that Twitter's crawler needs to properly render the card image.

Changes

Added to website/src/layouts/BaseLayout.astro:

  • og:image:width and og:image:height — Twitter's crawler uses these to validate image dimensions without downloading the file. Without them, the crawl can timeout and skip the image.
  • og:image:type — helps Twitter identify the image format during content negotiation.
  • twitter:image:alt — provides alt text for the card image (accessibility best practice).

Testing

After deploy, verify with Twitter's Card Validator to confirm the image renders.

Add og:image:width, og:image:height, og:image:type, and
twitter:image:alt meta tags so Twitter/X can properly display
the social card image when links are shared.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 25, 2026 22:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes social card image rendering on Twitter/X by adding missing Open Graph and Twitter meta tags to the website's base layout. While the social cards worked correctly on LinkedIn, Twitter's crawler requires specific dimension and type metadata to avoid timeouts and properly render images.

Changes:

  • Added Open Graph image metadata (og:image:type, og:image:width, og:image:height) to help Twitter validate the social card image
  • Added Twitter-specific alt text (twitter:image:alt) for accessibility

@aaronpowell aaronpowell merged commit f638f1d into staged Feb 25, 2026
6 checks passed
@aaronpowell aaronpowell deleted the x-social-cards branch February 25, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants