OpenGraph Viewer

Open Graph Examples

Copy-paste Open Graph tags for the pages people actually build: a homepage, a blog post, a product and a video. Change the values, paste them into your head tag, and test the page at the bottom.

Homepage or Landing Page

<meta property="og:title" content="Your Page Title" />
<meta property="og:description" content="One or two sentences about this page." />
<meta property="og:image" content="https://example.com/images/social-card.png" />
<meta property="og:url" content="https://example.com/your-page" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Your Site" />
<meta name="twitter:card" content="summary_large_image" />

Blog Post or Article

Set og:type to article and add the publish date and author. LinkedIn's Post Inspector looks for both.

<meta property="og:type" content="article" />
<meta property="og:title" content="How to Fix a Blurry Link Preview" />
<meta property="og:description" content="Blurry preview images come down to three things. Here's how to check each one." />
<meta property="og:image" content="https://example.com/images/blurry-preview.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:url" content="https://example.com/blog/fix-blurry-link-preview" />
<meta property="og:site_name" content="Example Blog" />
<meta property="article:published_time" content="2026-11-30T09:00:00Z" />
<meta property="article:author" content="https://example.com/about" />
<meta name="author" content="Jane Doe" />
<meta name="twitter:card" content="summary_large_image" />

Product Page

product isn't in the core Open Graph spec, but Pinterest and Meta's catalog tools read it along with the price tags.

<meta property="og:type" content="product" />
<meta property="og:title" content="Trail Running Shoes" />
<meta property="og:description" content="Lightweight trail shoes with a grippy sole. Free returns for 30 days." />
<meta property="og:image" content="https://example.com/images/trail-shoes.jpg" />
<meta property="og:url" content="https://example.com/products/trail-running-shoes" />
<meta property="og:site_name" content="Example Store" />
<meta property="product:price:amount" content="129.00" />
<meta property="product:price:currency" content="USD" />
<meta name="twitter:card" content="summary_large_image" />

Video Page

<meta property="og:type" content="video.other" />
<meta property="og:title" content="Setting Up Open Graph Tags in 5 Minutes" />
<meta property="og:description" content="A quick walkthrough of the tags every page needs." />
<meta property="og:image" content="https://example.com/images/video-poster.jpg" />
<meta property="og:url" content="https://example.com/videos/open-graph-setup" />
<meta property="og:video" content="https://example.com/videos/open-graph-setup.mp4" />
<meta property="og:video:type" content="video/mp4" />
<meta property="og:video:width" content="1280" />
<meta property="og:video:height" content="720" />
<meta name="twitter:card" content="summary_large_image" />

Next.js Example

In the App Router, export a metadata object from the page or layout. Next.js writes the tags for you.

export const metadata = {
  title: "Your Page Title",
  description: "One or two sentences about this page.",
  openGraph: {
    title: "Your Page Title",
    description: "One or two sentences about this page.",
    url: "https://example.com/your-page",
    siteName: "Your Site",
    type: "website",
    images: [
      {
        url: "https://example.com/images/social-card.png",
        width: 1200,
        height: 630,
        alt: "A short description of the image",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
  },
};

WordPress Example

An SEO plugin like Yoast or Rank Math already adds these tags, so check your page before writing any code. If you'd rather do it by hand, this goes in your theme's functions.php:

add_action( 'wp_head', function () {
	if ( ! is_singular() ) {
		return;
	}

	$tags = array(
		'og:type'        => 'article',
		'og:title'       => get_the_title(),
		'og:description' => get_the_excerpt(),
		'og:url'         => get_permalink(),
		'og:site_name'   => get_bloginfo( 'name' ),
		'og:image'       => get_the_post_thumbnail_url( null, 'full' ),
	);

	foreach ( array_filter( $tags ) as $property => $content ) {
		printf(
			'<meta property="%s" content="%s" />' . "\n",
			esc_attr( $property ),
			esc_attr( wp_strip_all_tags( $content ) )
		);
	}

	echo '<meta name="twitter:card" content="summary_large_image" />' . "\n";
} );

What Good Open Graph Tags Have in Common

  • Every page has its own title, image and URL. Nothing is copied from the homepage.
  • The image is 1200x630 with a full https:// URL. See the OG image size guide.
  • The title is the page's title without the site name. The site name goes in og:site_name.
  • og:url matches the canonical URL.

For what each tag does, see the Open Graph tags list. To build a set from a form, use the generator.

Frequently Asked Questions

Where do I paste Open Graph tags?

Inside the head section of the page's HTML, on every page you want to control. They have to be in the HTML your server sends, because crawlers don't run JavaScript.

What is a good og:image example?

A 1200x630 JPG or PNG with the page's headline in large text and your logo, served from a full https:// URL. Keep the important parts away from the edges, since some apps crop to a square.

Do I need different Open Graph tags for each page?

Yes. og:title, og:description, og:image and og:url should describe that specific page. og:site_name and twitter:card can be the same everywhere.

How do I know my Open Graph tags work?

Publish the page and paste its URL into the checker on this page. It shows the preview Facebook, X and LinkedIn will build and lists anything missing.

Last checked Nov 30, 2026.

Test Your Open Graph Tags

Paste your URL to see the preview these tags produce.

Enter a public URL like example.com or https://example.com/blog.

Paste a URL above to see how it looks on social media

Works with any public website. No login needed.