Best WordPress OG Image Plugins: Yoast, Rank Math, and All in One SEO Compared
Compare the top WordPress plugins for managing Open Graph meta tags and og:image — Yoast SEO, Rank Math, and All in One SEO — and learn how to fix missing or broken social previews.
Updated March 2026
The Problem: WordPress Doesn't Add OG Tags by Default
Out of the box, WordPress doesn't output Open Graph meta tags. This means social previews for your posts and pages will be broken — no image, wrong title, or just a plain text link with no preview card.
The fix is to install an SEO plugin that handles OG tags. The three most popular options are:
Option 1: Yoast SEO (Most Popular)
Yoast SEO is the most widely used WordPress SEO plugin. It adds OG tags to every post, page, and taxonomy automatically.
How to Set OG Image in Yoast
- Install and activate Yoast SEO
- On any post/page, scroll to the "Yoast SEO" meta box at the bottom
- Click Social (the icon that looks like a share symbol)
- Click Facebook tab → set the "Facebook image"
- Click Twitter tab → set the "Twitter image"
- If no image is set per-post, Yoast falls back to the site-wide OG image set in: SEO → Social → Facebook → Default image
Auto-fallback: Yoast uses the post's Featured Image as og:image by default if no social-specific image is set. Make sure your featured images are set and at least 1200×630px.
Enabling Twitter Cards in Yoast
Go to SEO → Social → Twitter and make sure "Add Twitter card meta data" is toggled ON. Select "Summary with large image" for the card type.
Option 2: Rank Math (Feature-Rich Free Tier)
Rank Math has become a strong alternative to Yoast, with more features available on the free tier.
How to Set OG Image in Rank Math
- Install and activate Rank Math
- On the post editor, click the "Rank Math" icon in the top right or the meta box
- Go to Social tab
- Set the Facebook and Twitter images individually
- Site-wide defaults: Rank Math → Titles & Meta → Global Meta
Rank Math supports dynamic OG image templates using post data, which is useful for automatically generating consistent branded social images.
Option 3: All in One SEO (AIOSEO)
AIOSEO is another solid option, particularly known for its beginner-friendly setup wizard.
How to Set OG Image in AIOSEO
- Install and activate AIOSEO
- On the post editor, open the AIOSEO meta box → Social tab
- Set the Facebook and Twitter images
- Site-wide defaults: All in One SEO → Social Networks → Open Graph Settings
Plugin Comparison
| Feature | Yoast | Rank Math | AIOSEO |
|---|---|---|---|
| OG tags (free) | ✅ | ✅ | ✅ |
| Twitter cards (free) | ✅ | ✅ | ✅ |
| Per-post OG image | ✅ | ✅ | ✅ |
| Site-wide fallback image | ✅ | ✅ | ✅ |
| Dynamic OG image templates | ❌ (Pro) | ✅ (free) | ❌ (Pro) |
| OG preview in editor | ✅ | ✅ | ✅ |
| Performance impact | Medium | Low | Low |
Common WordPress OG Tag Problems
Problem: Two plugins both outputting OG tags
If you have both Yoast and AIOSEO active, you'll get duplicate OG tags. Platforms may read the first one, the last one, or behave unpredictably. Use only one SEO plugin at a time.
Problem: Theme also outputting OG tags
Some themes include their own OG tag output. Check your theme's functions.php or header template for og:image. Disable the theme's OG output if using a plugin.
Problem: Featured image too small
If your featured images are smaller than 1200×630px, they'll be used but may appear blurry or cropped. Yoast and Rank Math will warn you if the image is too small in the social preview panel.
Problem: Caching plugin serving stale OG tags
WP Rocket, W3 Total Cache, or other caching plugins may serve outdated OG tags after you update a post. Clear your cache after making social tag changes.
Verify your WordPress OG tags →
Paste your WordPress URL into OGFixer to see exactly what social platforms will show — catches duplicate tags, wrong images, and missing fields.
Check my WordPress OG tags →