CMS-General

Include an open graph meta tag on images in your HubSpot pages

Last updated: December 22, 2018

Applies to:

Marketing Hub  Professional, Enterprise
Legacy Marketing Hub Basic

You can add an open graph tag to the head HTML of your website page or landing page to ensure your content displays the way you want on other sites, such as social media platforms. Open graph meta tags are included on images in your HubSpot blog posts automatically. 

To add an open graph meta tag to an image on a landing page or website page, add this code snippet to the head HTML of your page:

 <meta property="og:image" content="IMG URL">

When adding your code, replace IMG URL with the URL of your image file.

Twitter Cards require an additional meta tag to display preview content from your page. To optimize the way your content displays when shared on Twitter, add the following code snippet to the head HTML of your page: 

 <meta name="twitter:card" content="summary_large_image">