Back to articles
How to Add OG Images to Your Website (Manual vs. Automated)

How to Add OG Images to Your Website (Manual vs. Automated)

via Dev.to TutorialNarender singh

Every time you share a link on Twitter, Slack, Discord, or LinkedIn, the platform fetches your page's meta tags to build a preview card. The og:image tag controls what image shows up. If you don't set one, you get either nothing or whatever the crawler decides to grab from your page. Usually it picks your logo at 50x50 pixels. Looks awful. I've spent way too long manually creating OG images in Figma, so here's what I've learned about the different ways to handle this. What og:image actually does It's a meta tag in your HTML head: <meta property= "og:image" content= "https://yoursite.com/og-image.png" /> Social platforms read this when someone pastes your URL. Facebook, Twitter, LinkedIn, Discord, Slack — they all use it. The recommended size is 1200x630 pixels. Some platforms crop differently, but 1200x630 is the safe bet that works everywhere. You also want og:title and og:description, but the image is what people actually notice. A link with a good preview image gets clicked. A link

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
2 views

Related Articles