All topics

How to Add Custom OG Images to Your Ghost Site

Ghost has surprisingly solid built-in support for Open Graph tags. The challenge is that the default behavior pulls from your featured image, which is not always the right choice for social sharing. Here is how to take full control of OG images in Ghost, whether you are using a built-in theme or a custom one.

Ghost injects og:image automatically from the featured image

By default, Ghost uses the post or page featured image as the `og:image`. If you set a featured image, Ghost automatically adds the correct meta tags. The problem is that featured images are often sized and composed for in-content display rather than for the 1200x630 social card format. To get a properly sized card, you need a separate image optimized for the OG dimensions, not the same image repurposed from your article hero.

Set a custom OG image per post in the Ghost editor

In the Ghost admin editor, open the post settings panel and scroll to the "Facebook" and "Twitter" sections under "SEO." You can upload a separate image for each platform there. This overrides the featured image for social sharing without affecting how the post looks on your site. Upload your generated OG image (1200x630px) to the Facebook field and your Twitter-sized variant (1200x600px) to the Twitter field.

Override og:image in your theme's default.hbs

If you maintain a custom Ghost theme, locate `default.hbs` (or the equivalent head partial) and look for the `{{ghost_head}}` helper. Ghost injects most meta tags through this helper. To override the OG image globally, add a `<meta property="og:image" content="{{og_image}}" />` tag before `{{ghost_head}}` and define a `og_image` helper in your theme that falls back to a default CDN URL when the post does not have one set. This gives you a reliable fallback without touching the Ghost core.

Use theme partials for consistent branding across post types

For Ghost sites with multiple post types (articles, podcasts, tutorials), create separate head partials in `partials/` and include them conditionally based on `{{#is "post"}}` and `{{#is "page"}}` helpers. Each partial can set a different default OG image appropriate for that content type. This avoids the one-size-fits-all approach and ensures every content type has a visually appropriate social card even without a manually set image.

Generate your OG image in seconds

Paste a title, pick a brand color, and get production-ready social cards for every platform — with framework-specific meta tag snippets included.

Generate an OG image for your Ghost site