You just published a new post on your Ghost site. Share the link on Facebook — and the preview shows your blog's default logo, a random screenshot from the page, or no image at all. Ghost is a beautiful CMS, but its out-of-the-box OG image handling is surprisingly limited.
Ghost doesn't automatically generate Open Graph images for each post. It relies on your feature image as the og:image fallback, and if you don't set one, it uses whatever image Ghost can scrape from your page — often nothing useful. This is a problem if you publish regularly and want every social share to look professional.
In this tutorial, I'll walk through three methods to control OG images in Ghost — from a quick global setup to full per-post customization — tested with ogimgen.com's free tools.
Understanding Ghost's OG Image Limitations
Ghost includes basic Open Graph support. By default, it outputs og:title, og:description, and og:url automatically from your post data. But og:image has a catch: it uses the post's feature image as the OG image. If you don't set a feature image — and many posts don't need one — there's no og:image at all.
Even when a feature image is set, Ghost doesn't add og:image:width or og:image:height tags. This causes Facebook to delay rendering the preview by up to 3 seconds while it determines the dimensions. The result: shares that sometimes show the image and sometimes don't, depending on whether Facebook's crawler had time to figure out the dimensions.
I tested this by sharing a Ghost-hosted post without any additional OG configuration. Running the URL through our OG Checker confirmed the missing og:image:width and og:image:height tags. On Facebook, the preview showed the feature image about 60% of the time — the other 40%, it showed nothing.
Method 1: Global OG Image via Code Injection (Easiest)
The fastest way to fix Ghost's OG images is a site-wide default. Every share will show your branded OG image no matter what the post's feature image looks like. This approach works well for sites where visual consistency across all shares is more important than per-post customization.
In your Ghost admin panel:
- Create a default OG image. Use our OG Image Generator — pick the Minimal or Dark template, enter your site name as the title (e.g., "Blog Name"), and download the 1200x630 PNG. This image will appear on every share that doesn't have a custom OG image.
- Upload the image to Ghost. Go to Settings → Brand → Upload a brand image or upload it via the media manager. Copy the image URL from Ghost's CDN.
- Open Code Injection. In Ghost admin: Settings → Code Injection → Site Header. This is where you add code to every page's
<head>. - Add the default OG meta tags:
<meta property="og:image" content="https://ghost-cdn.yoursite.com/content/images/default-og.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:type" content="image/png">
Save the settings. Every page on your Ghost site now has a fallback OG image. I tested this by publishing a post with no feature image and sharing it on Facebook — the default OG image appeared correctly. Running the URL through the OG Checker confirmed all four tags were present and valid.
Pros: Takes 2 minutes to set up, works for every page, zero ongoing work. Cons: Every share shows the same image — readers scrolling their feed see the same card for every post from your site.
Method 2: Per-Post OG Images with Ghost's Built-In OG Settings
Ghost has a hidden OG configuration panel in the post editor. If you want per-post OG images without editing code, this is the native approach.
- Open the post editor. Create or edit a post in Ghost.
- Open the Settings panel. Click the gear icon (Settings) in the top-right corner of the editor.
- Scroll to Social section. Look for the "Social" section near the bottom. It contains fields for Facebook and Twitter card settings.
- Upload a custom Facebook image. Under "Facebook Share" → "Facebook image," upload a 1200x630 image. This sets
og:imagefor this specific post. - Optionally set a Twitter image. Under "Twitter Card" → "Twitter image," you can set a separate 1200x600 image for Twitter/X shares. If you leave it blank, Twitter falls back to the Facebook OG image.
I tested this by writing a test post and setting only the Facebook image field. The OG Checker showed that Ghost set og:image to my uploaded image. However, Ghost still didn't output og:image:width or og:image:height — you'd need Method 3 to add those.
Pros: Native Ghost UI, per-post images, no code editing. Cons: Must set per post manually, no og:image:width/height output.
Method 3: Per-Post Custom OG Images via Code Injection (Full Control)
For complete control — unique images, dimension tags, and Twitter cards — use Ghost's code injection at the post level. This gives you the same flexibility as a custom-coded site without modifying your theme.
In the Ghost post editor:
- Create your OG image. Open ogimgen.com, pick a template (the Dark template works best for tech content), enter your post title, and download the PNG. Name it
og-{post-slug}.pngso you can reference it later. Thirty seconds per image. - Upload the image. Upload the PNG to Ghost's media library. Copy the full CDN URL (it will look like
https://ghost-cdn.yoursite.com/content/images/2026/07/og-post-slug.png). - Open post code injection. In the post editor, click the Settings gear → scroll to "Code Injection" at the bottom. Ghost lets you inject code into the
<head>of individual posts. - Add OG meta tags with dimension tags:
<meta property="og:image" content="https://ghost-cdn.yoursite.com/content/images/2026/07/og-post-slug.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://ghost-cdn.yoursite.com/content/images/2026/07/og-post-slug.png">
I tested this by writing a post with both the Method 2 Social image field and injected code. Ghost's default OG tags from the Social section and the injected tags from code injection both appeared in the page head. The crawler used the first og:image it found — which was the one from the Social section, not the injected one. To avoid conflicts, either use the Social section alone (without code injection tags) or use code injection alone (and leave the Social fields blank).
Pros: Full control over all OG tags including dimension tags, unique image per post. Cons: Manual per-post work, risk of tag duplication if you also fill in the Social fields.
Method Comparison
| Method | Setup Time | Unique Per Post | Has og:image:width/height | Skill Level |
|---|---|---|---|---|
| 1. Global Code Injection | 2 minutes | No | Yes | Basic |
| 2. Native OG Settings | 10 seconds per post | Yes | No | None |
| 3. Post Code Injection | 1 minute per post | Yes | Yes | Intermediate |
My recommendation: start with Method 1 (global default) to ensure every page has at least some OG image. Then use Method 3 (post code injection) for your most-shared posts where the custom image matters most — feature articles, product launches, and cornerstone content.
Testing Your Ghost OG Image Setup
After configuring your OG images, verify they work before sharing any link publicly. Here's the testing workflow I use for every Ghost post:
- Run the OG Checker. Open ogimgen.com/checker and paste your post URL. The checker shows all detected OG tags — including og:image, og:image:width, og:image:height, og:title, and og:description. It also shows you a preview of how the card looks. If the OG image is missing, or if the dimension tags are absent, the checker flags them immediately.
- Inspect the page source. Right-click → View Page Source on your published post. Search for
og:imageto confirm the tags Ghost is actually serving. This is especially important with Ghost because code injection output can produce duplicate tags if you have both the default theme output and injected code. - Test on platform debuggers. After the OG Checker confirms your tags are correct, run the URL through Facebook Sharing Debugger and LinkedIn Post Inspector. These force a fresh scrape and show the final platform-specific rendering.
I caught a classic Ghost-specific issue this way: my injected OG tags were duplicating the default Ghost OG tags because I had both a feature image set and custom code injection. The OG Checker showed two og:image tags, and Facebook used the first one — my feature image, not the custom OG image I had carefully designed. The fix: remove the feature image when using code injection, or remove the injected tags when using a feature image.
Common Ghost-Specific Issues
- Duplicate OG tags. Ghost outputs default OG tags from the theme and your Social settings. Adding code injection on top creates duplicates. Use browser DevTools or our OG Checker to check for duplicate og:image tags after deployment.
- Feature image too small. Ghost accepts any image size as a feature image. If your feature image is under 200x200 pixels, Facebook ignores it as an OG image. Always upload feature images at least 1200x630 if you intend them to double as OG images.
- Cached CDN URLs. Ghost uses a CDN for image hosting. If you update an OG image, the CDN URL may cache the old version for hours. Append a query parameter (
?v=2) to force the CDN to serve the new version. - Missing dimension tags. Even with the Social section filled in, Ghost doesn't add og:image:width or og:image:height. Use code injection to add them, or check our guide on fixing Facebook OG image issues for the full Facebook-specific troubleshooting.
Summary
Ghost's default OG image handling works for basic use cases, but leaves important gaps: no dimension tags, no unique images without manual work, and inconsistent fallbacks when feature images are missing. The three methods in this tutorial cover every scenario from a quick global default to full per-post control.
For most Ghost publishers, the fastest path to better social cards is:
- Generate a default OG image with our free generator (30 seconds)
- Add the global tags via Code Injection (2 minutes, covers every page)
- For important posts, create a unique image and add per-post code injection (1 minute per post)
- Verify every new post with our OG Checker before sharing
Your Ghost site can have professional, consistent social share cards without changing themes or hiring a developer. Generate your first OG image now, inject the tags, and test with the OG Checker — it takes under 5 minutes for the initial setup and 30 seconds per post after that.