Automate OG image generation with ogimage.org

Open Graph Meta Tags

Specifying Open Graph meta tags is essential for controlling how content appears when shared on social media, ensuring it looks attractive and accurately represents the page's content to drive engagement.

Published on 2024-03-03 by Dmytro Krasun

The Open Graph protocol allows web pages to become rich objects in a social graph, enabling any web page to have the same functionality as any other object on social media platforms like Facebook, LinkedIn, and Twitter.

It works by allowing web pages to include specific metadata tags in the HTML that can influence how the page is represented when shared or liked on social platforms.

The minimum required Open Graph tags that must be specified are:

  1. og:title is the title of your article or page.
  2. og:type is the type of your content (e.g., article, website).
  3. og:image is an image URL which should represent your content.
  4. og:url is the canonical URL of your page or article.

Check out an example of how Shipixen uses meta tags in the HTML:

<meta
property="og:title"
content="Make custom Next.js boilerplates with an MDX blog, TypeScript and Shadcn UI"
/>
<meta
property="og:description"
content="Branded boilerplates for your website, product or blog. Get an SEO optimized Markdown blog running Next.js 14, TypeScript, TailwindCSS + Shadcn UI. Deploy to Vercel with 1 click."
/>
<meta property="og:url" content="https://shipixen.com/" />
<meta
property="og:site_name"
content="Make custom Next.js boilerplates with an MDX blog, TypeScript and Shadcn UI"
/>
<meta property="og:locale" content="en_US" />
<meta
property="og:image"
content="https://shipixen.com/static/images/ogImg.jpg"
/>
<meta property="og:type" content="website" />

These tags help ensure that when a link to your site is shared on social media, it displays with a title, image, and description that accurately represent the content of the link.

On social media the resulting image of Shipixen looks like:

An Open Graph image example

Using Open Graph meta tags can improve user engagement and click-through rates. Make sure you don’t miss on that opportunity and check our Open Graph examples for inspiration.

Frequently asked questions

Answers to the questions people often ask about the Open Graph protocol and Open Graph social cards.

What is Open Graph?
Open Graph is a protocol that allows web pages to become rich objects in a social graph. Essentially, it is a set of meta tags added to the HTML of a webpage that provides information about the content of the page, such as the title, type, URL, image, video, and site name.
How is the Open Graph protocol used?
The information specified in the Open Graph meta tags is used by social media platforms like Facebook, Twitter, LinkedIn, and Pinterest to display a preview of the webpage when it is shared on their platforms.
What is an Open Graph checker?
An Open Graph checker, or validator, is a tool that inspects your webpage to verify that the Open Graph tags are correctly implemented. It checks for the presence of necessary tags and whether they contain appropriate values that will effectively represent your content on social media platforms.
How to debug the Open Graph protocol?
To debug the Open Graph protocol, ensure correct OG tags are implemented, use validator tools like Facebook Sharing Debugger, Twitter Card Validator or our Open Graph tester to identify and fix errors, and clear social media caches to reflect changes.
What is the purpose of Open Graph images?
The purpose of Open Graph (OG) image is to provide a visual preview of the content being shared on social media platforms, enhancing engagement by giving users a quick understanding of what the linked page is about. Check out our OG image examples for inspiration.
What mediums support the Open Graph protocol?
The Open Graph protocol is supported by social media platforms, messaging apps, search engines, content aggregators and readers, email marketing tools, and bookmarking and content sharing services.
Where I can find Open Graph Image templates?
OpenGraphExamples.com is a valuable resource for anyone seeking inspiration for designing Open Graph image templates. The website showcases a variety of examples that demonstrate how effectively designed Open Graph images can enhance social media visibility and engagement.