Back to articles
Why Your Link Preview Looks Ugly on Twitter (And How to Fix It)

Why Your Link Preview Looks Ugly on Twitter (And How to Fix It)

via Dev.toPikzor

You just published a blog post you're proud of. You share it on Twitter. And then you see it — a tiny logo, no description, or worse, a completely blank card with just the URL. Meanwhile, every other link in your feed has a clean, full-width preview image with a title and description. What went wrong? The answer is almost always one of five things. Let's go through each one and fix it. How Twitter link previews actually work When you paste a URL into a tweet, Twitter sends a bot (called "Twitterbot") to crawl your page. This bot reads your HTML and looks for specific meta tags called Open Graph tags and Twitter Card tags. These tags tell Twitter: "Here's the title to display, here's the description, and here's the image." If the bot can't find these tags, or finds them but something is wrong, your link preview either looks broken or doesn't show up at all. Here's what a properly configured set of tags looks like: <head> <!-- Open Graph tags (used by LinkedIn, Facebook, Slack, Discord)

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles