OG Pilot
WordPress open graph plugin

WordPress Open Graph plugin for OG tags and OG images

A WordPress Open Graph plugin decides who writes the OG tags and where the OG image comes from. Use a theme hook when one uploaded file is the whole preview. Use Yoast or Rank Math when an uploaded social image should stay the card. Install OG Pilot when posts, pages, or WooCommerce products should get a generated card. Use an API key or MCP when the image is signed outside WordPress. The step-by-step is how to change the OG image in WordPress. What each tag means is the Open Graph protocol on WordPress.

AIOSEO's default post image source is a setting you choose, documented on its Facebook default-image page. This app returns an image URL. The plugin prints og:title, og:description, og:image, and og:url when Open Graph output is on. Check a live preview in the Open Graph debugger.

When to use each WordPress OG path

Yoast or Rank Math fields

  • The SEO plugin should own the social tags.
  • The artwork is an upload: a social image, the featured image, or a sitewide default.
  • You do not need a new layout when the title changes. The file stays the file.

Dynamic OG Pilot image

  • Install the plugin when the content is posts, pages, or WooCommerce products.
  • Get an API key when PHP, Rails, or another app should sign the same templates.
  • Use MCP when an agent should create the card.

Plugin meta tags vs dynamic API OG images

Featured-image behavior is from the WordPress theme handbook. Yoast's order is from its Open Graph functional spec. Rank Math's fallback and 1200×630 note are from Titles and Meta. OG Pilot plugin behavior is from the WordPress.org listing. API cache rules are from the API docs.

DimensionWordPress plugin meta tagsDynamic API OG images
Best fitPosts, pages, and WooCommerce products that should get OG tags without a theme hook.A PHP, Ruby, JavaScript, or Python app, or an agent that should create the card.
What you addThe OG Pilot WordPress plugin. Connect with OAuth. No API key in the theme.An API key and a server-signed request, or the remote MCP connector.
Auth this app implementsOAuth with PKCE (S256). A signed-in account links the site. The plugin then calls the image API with a bearer token.HS256 JWT. Required claims are iss (verified domain) and sub (API key prefix).
og:imageThe plugin prints that CDN URL as og:image. If generation has no URL yet, it prints the featured image instead, and it skips processing placeholders.Your template prints the returned URL in og:image and twitter:image.
og:title, og:description, og:urlWith Open Graph output on, the plugin prints og:title, og:description, and og:url. This app only returns the image URL.You write them. The image API does not.
Theme tagsTurn the theme hook off, or the page can print two sets of tags.Same rule: one writer for each property.
Yoast, Rank Math, AIOSEOMeta Ownership set to External SEO plugin makes the plugin skip its tags. AIOSEO's default post image source is the option you pick on its Facebook settings page.You decide whether your template also prints tags. Do not double-print og:image.
Domain checkWordPress OAuth marks the site domain verified. There is no DNS TXT step in that flow.The API docs require a DNS TXT record before the API generates images.
When the title changesThe listing's placeholders, including {{post_title}}, are filled into the title and description. Auto-generate on save queues a new image.Send the new title on the next signed request. Pass iat for the documented 24-hour cache window.
Latency and costPlugin FAQ: most images ready in 5–10 minutes via WP-Cron. That line is not measured here.Plan catalog: Starter $5/month, Builder $49/month, Growth $99/month. No per-image price in that catalog.

Theme meta tags and the featured image

A featured image is an attachment on the post. The theme handbook says you enable it with add_theme_support('post-thumbnails') and print it with the_post_thumbnail() or wp_get_attachment_image_src(). That prints an <img> in the page. Social apps do not treat that image as og:image unless something in wp_head says so.

Use this path when a designer already exported the card and the URL can stay stable. Skip it when every post needs a different layout, or when you do not want the tag logic living in the theme.

Copy-paste: featured image as og:image

<?php
// Example you maintain. WordPress core does not print og:image.
add_action( 'wp_head', function () {
    if ( ! is_singular() || ! has_post_thumbnail() ) {
        return;
    }

    $image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
    if ( ! $image ) {
        return;
    }

    $url = esc_url( $image[0] );
    echo '<meta property="og:image" content="' . $url . '" />' . "\n";
    echo '<meta property="og:image:width" content="' . (int) $image[1] . '" />' . "\n";
    echo '<meta property="og:image:height" content="' . (int) $image[2] . '" />' . "\n";
    echo '<meta name="twitter:card" content="summary_large_image" />' . "\n";
    echo '<meta name="twitter:image" content="' . $url . '" />' . "\n";
} );

Yoast and Rank Math social fields

Yoast's Open Graph functional spec populates og:image only when it finds a valid image, in this order: a user-defined Facebook image in the Social tab, the featured image (posts only), a prominent image from the content, the social default from Search Appearance, then the site fallback. The current help article labels the editor Social media appearance, where you set an image, title, and description. The spec still calls the stored field a Facebook image.

Rank Math's Open Graph guide calls og:title, og:type, og:url, and og:image essential. The same guide lists the image order as the Social-tab OpenGraph image, then the featured image, then the first image in the post, then the default OpenGraph thumbnail. Titles and Meta says that thumbnail (Rank Math SEO → Titles & Meta → Global Meta) is the fallback when a post has neither a featured image nor an OpenGraph image, and it recommends 1200×630.

Both plugins attach tags to a file you already have. They are the right tool when the preview is a photograph or a designed PNG. They are the wrong tool when the headline has to be drawn into the image on every publish. AIOSEO's default Facebook image doc lets you set Default Post Image Source to Default Image, Featured Image, Attached Image, First Image in Content, Image from Custom Field, Post Author Image, or First Available Image. The Default Post Facebook Image is the fallback when that source has no file. The OG Pilot plugin FAQ says Meta Ownership set to External SEO plugin stops OG Pilot tags so Yoast, Rank Math, or AIOSEO can keep theirs. The plugin source returns before printing tags in that mode.

Plugin setup and the dynamic API

On a WordPress site, install the plugin. It connects with OAuth, queues generation, and writes the tags. The PHP sample is for a server outside that plugin: a Laravel app, a custom integration, or a non-WordPress PHP site that should share the templates. Keep OG_PILOT_API_KEY in the environment. The API docs say signing happens in your application, and that a domain must be verified with DNS TXT before the API generates images. How that hosted API compares with @vercel/og and DIY Satori is on the OG image API page. The plugin FAQ says the WordPress OAuth flow does not add that manual DNS step.

Plugin setup

1. Install OG Pilot Dynamic Open Graph Images
   https://wordpress.org/plugins/og-pilot-dynamic-open-graph-images/
2. Activate it. Admins are redirected to the setup wizard.
3. Settings → OG Pilot Open Graph Images
4. Connect with OG Pilot (OAuth + PKCE). No API key in the theme.
5. Choose a default template and the content types (post, page, product).
6. Optional: Meta Ownership = External SEO plugin
   when Yoast, Rank Math, or AIOSEO should keep the tags.

Meta tag shape the plugin documents

The plugin listing says it outputs Open Graph and X/Twitter tags,
including og:image and twitter:image. Release 0.1.0 also added
og:image:url, twitter:image:src, and twitter:domain.

<meta property="og:image" content="https://cdn.ogpilot.com/..." />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://cdn.ogpilot.com/..." />

Placeholders the listing documents include {{post_title}}, {{excerpt}},
and {{featured_image_url}}. The featured image can be a field on the
generated card. It is not, by itself, the og:image.

PHP SDK for a dynamic image (server only)

<?php
// Server you control. Prefer the official plugin inside WordPress.
// Docs: https://ogpilot.com/docs
use Sunergos\OgPilot\OgPilot;

OgPilot::setConfig([
    "api_key" => getenv("OG_PILOT_API_KEY"),
    "domain" => getenv("OG_PILOT_DOMAIN"),
]);

$imageUrl = OgPilot::createImage([
    "template" => "blog_post",
    "title" => "Post title",
], ["iat" => time()]);

// Then print the URL. Do not commit the API key.
echo '<meta property="og:image" content="' . htmlspecialchars($imageUrl, ENT_QUOTES) . '" />';

Raw HTTP shape

POST https://ogpilot.com/api/v1/images
Content-Type: application/json

{"token":"YOUR_JWT_TOKEN"}

Required JWT claims: iss (verified domain), sub (API key prefix).
If iat is present, the image cache is valid for 24 hours from that
timestamp. Omit iat and the cache does not expire on its own.
Prefer an official SDK over hand-rolled JWT signing.

Pass iat when you want the documented 24-hour cache window. Social networks can still keep an older scrape of the same URL. After the artwork changes, re-check the permalink.

MCP, when an agent should make the card

The remote endpoint is https://ogpilot.com/mcp. The block below is the remote config for a client that accepts an mcpServers map. Claude and ChatGPT do not read that file. Connector screens differ, so follow /docs/mcp instead of guessing a second config. MCP fits a workflow where an agent creates the image from a URL. It does not replace the plugin for a normal WordPress publish.

MCP remote config

{
  "mcpServers": {
    "og-pilot": {
      "type": "streamable-http",
      "url": "https://ogpilot.com/mcp"
    }
  }
}

# Auth: OAuth 2.1 with PKCE. No API key in this file.
# Claude and ChatGPT do not read this file. Follow /docs/mcp.
# Do not add command, args, or a bearer token.
Plugin setup flow

From install to production

This is the WordPress path. The plugin handles auth, the generation queue, and social tag output for posts, pages, and WooCommerce products. Use the theme snippet or the raw API only when this install is the wrong shape.

1

Install and activate the plugin

Install OG Pilot Dynamic Open Graph Images from WordPress.org, then activate it. Web activations send admins to the setup wizard. WP-CLI activations skip that redirect.

2

Run the setup wizard

Open Settings → OG Pilot Open Graph Images. The listing describes a 3-step wizard for the connection, the default template, and enabled content types.

3

Connect with OG Pilot over OAuth

Use Connect with OG Pilot. The plugin handles PKCE and token refresh. The FAQ says you do not paste a long-lived API secret into the theme, and the WordPress OAuth flow has no manual DNS step.

4

Choose templates and rules

Set a default template, then optional rules for post, page, product, and taxonomy slugs. Public templates listed for the plugin are page, blog_post, podcast, portfolio, book, event, product, company, and github.

5

Publish and auto-generate

With auto-generation enabled, saving a post queues a card in the background. The FAQ says page loads do not wait on generation, and a processing image is returned until the final file is ready.

Why the plugin

The WordPress install of the same dynamic image

Keep the theme free of API keys. The plugin listing is the source for the behavior in this list.

  • Official WordPress.org plugin for generated og:image and twitter:image tags.
  • No manual DNS step in the WordPress OAuth flow. The API path still verifies the domain.
  • Bulk regenerate queue with progress in wp-admin.
  • Import of existing social fields from Yoast, Rank Math, and AIOSEO.
  • When the subscription is inactive, new generation pauses and existing image URLs keep working.

WordPress library

Install the plugin when the content lives in WordPress

Posts, pages, and products stay on the plugin. Everything else uses an API key or MCP.

Install WordPress plugin

Listed on WordPress.org. Requires WordPress 6.5+ and PHP 8.0+, per the plugin page.

Templates the plugin and the API share

Gallery renders of templates the plugin listing names, so you can see the card before you install. The same template names are what the API docs accept.

Ghost blog post template example
Ghostblog post

Blog Post

Editorial posts and SEO articles

Common fields: title, author_name, publish_date, featured_image_url

Trello product template example
Trelloproduct

Product

WooCommerce catalog and offer pages

Common fields: product_price, product_short_description, unique_selling_point

Basecamp page template example
Basecamppage

Page

Homepage, about, and service pages

Common fields: title, description, image_url, logo_url

Intercom event template example
Intercomevent

Event

Webinars, launches, and workshops

Common fields: event_date, event_location, image_url

Notion podcast template example
Notionpodcast

Podcast

Episode pages and show notes

Common fields: episode_date, host_name, cover_art

PostHog company template example
PostHogcompany

Company

Company profile and hiring pages

Common fields: company_logo_url, short_description, brand_colors

What the WordPress plugin takes off the theme

OAuth + PKCE auth flow

Account linking without pasting a long-lived API secret into theme files. The API path is the one that uses a server-side key.

Template system built for WordPress

The plugin listing names page, blog_post, podcast, portfolio, book, event, product, company, and github.

Rule-based automation

Assign template defaults by post type and by category, tag, or product type so the card follows the content, not a one-off upload.

Per-post overrides

The OG Pilot Social Image meta box is where editors override a single post, page, or product. Admins still own the global settings.

Background generation queue

The listing says generation is non-blocking, with a processing fallback and retry scheduling, so the editor save is not the image render.

SEO-plugin compatibility

Meta Ownership set to External SEO plugin stops OG Pilot tags so Yoast, Rank Math, or AIOSEO can keep theirs. Import copies their social fields in.

Queue time and plan prices

  • Plugin queue. The WordPress.org FAQ says most images are ready within 5–10 minutes, depending on queue load and site traffic that triggers WP-Cron.
  • Plan catalog. Starter is $5/month or $50/year with a 10,000-image quota. Builder is $49/month or $99/year with a 100,000-image quota. Growth is $99/month or $199/year with an unlimited image quota. Those defaults live in the app catalog and on pricing. A Stripe image_quota feature can replace the quota. The catalog has no per-image price.

Decision checklist

  1. One unchanging file, and you will maintain the tags? Print the featured image from wp_head.
  2. Yoast or Rank Math already owns social tags, and the card is an upload? Set the social image there.
  3. The library is posts, pages, or WooCommerce products? Install the OG Pilot plugin and connect OAuth.
  4. Both an SEO plugin and OG Pilot would print tags? Set Meta Ownership to External SEO plugin, or let OG Pilot own them. Don't leave both on.
  5. The page is outside WordPress, or an agent should create the card? Get an API key or follow the MCP guide.

Plugin for WordPress OG tags, API key and MCP everywhere else

Install the WordPress plugin when the content is posts, pages, or WooCommerce products. It connects over OAuth and can hand tag ownership to Yoast, Rank Math, or AIOSEO so you do not get two og:image tags. Get an API key when the same templates have to ship from another stack. The Next.js OG image guide uses that API from generateMetadata. The OG image API comparison is the same choice against @vercel/og and DIY Satori.

  • Get an API key

    Sign CDN URLs from PHP, Rails, or any server that is not the WordPress plugin.

  • Use MCP

    Install the remote connector so an agent can generate the card.

  • Generate one image

    Preview a branded card for a URL that does not live in this WordPress site.

  • Open Graph debugger

    Confirm the permalink before Facebook, X, LinkedIn, or Slack cache it.

  • API docs

    JWT claims, the PHP SDK, templates, and the 24-hour iat cache rule.

  • Change the OG image

    Featured image, SEO-plugin social image, or a generated card, one step at a time.

  • Open Graph protocol

    What og:title, og:description, og:image, and og:url mean, and who writes them.

WordPress Open Graph plugin questions

Is OG Pilot a WordPress Open Graph plugin?

Yes. The official plugin is OG Pilot Dynamic Open Graph Images on WordPress.org. In this app, connecting it is OAuth with PKCE: a signed-in account links the site, the domain is marked verified, and the plugin requests images with a bearer token. You do not paste an API key into the theme. Which Open Graph tags the plugin prints is answered in the next question.

What does the plugin set for og:title, og:description, og:image, and og:url?

This app returns an image URL. The plugin's render_og_tags prints the tags. With Open Graph output on (the default), it prints og:title (the configured title, or the post title), og:description (the configured description, or the excerpt), og:type (article for a post or the blog_post template, product for a WooCommerce product, otherwise website), og:url (the permalink), og:site_name, and og:locale. When it has an image URL it also prints og:image, og:image:url, og:image:width 1200, og:image:height 630, and og:image:alt. It uses the generated CDN URL, and the featured image only when that URL is missing. It does not print a processing placeholder. Twitter output defaults on and includes twitter:card summary_large_image and twitter:image.

How is a WordPress OG tags plugin different from theme tags?

The WordPress theme handbook describes featured images as pictures a theme prints after add_theme_support('post-thumbnails'). It does not document an og:image tag. A theme hook in wp_head can echo tags you maintain. The plugin is the path when you do not want that hook, and when the OG image should be a generated card instead of the attachment file.

How does this compare with Yoast, Rank Math, and AIOSEO social images?

Yoast's Open Graph functional spec sets og:image from a Facebook image in the Social tab, then the featured image on posts, then a prominent content image, then the Search Appearance social default, then the site fallback (https://developer.yoast.com/features/opengraph/functional-specification/). Rank Math's Open Graph guide lists the image order as the Social-tab OpenGraph image, then the featured image, then the first image in the post, then the default OpenGraph thumbnail, and Titles and Meta recommends 1200 by 630 for that thumbnail (https://rankmath.com/kb/open-graph-meta-tags/ and https://rankmath.com/kb/titles-and-meta/). AIOSEO's default post image source is a setting you choose: Default Image, Featured Image, Attached Image, First Image in Content, Image from Custom Field, Post Author Image, or First Available Image, with the Default Post Facebook Image as the fallback (https://aioseo.com/docs/setting-a-default-image-for-facebook/). Those tools attach tags to a file. The OG Pilot plugin FAQ says Meta Ownership set to External SEO plugin stops OG Pilot tags so Yoast, Rank Math, or AIOSEO can keep theirs. render_og_tags returns immediately in that mode.

When should I use the dynamic API instead of the WordPress plugin?

Use the plugin for posts, pages, and WooCommerce products. Use the API when PHP, Ruby, JavaScript, or Python should sign the same templates and you will print og:image yourself. The API docs require DNS TXT verification before generation. WordPress OAuth marks the domain verified without that TXT record. Use MCP at /docs/mcp when an agent should create the card. The remote endpoint is https://ogpilot.com/mcp.

Will this page publish latency or price benchmarks?

The plugin FAQ says most images are ready within 5 to 10 minutes depending on queue load and the site traffic that triggers WP-Cron (https://wordpress.org/plugins/og-pilot-dynamic-open-graph-images/). This page does not add a separate API timing. The plan catalog lists Starter at $5/month ($50/year, 10,000-image quota), Builder at $49/month ($99/year, 100,000-image quota), and Growth at $99/month ($199/year, unlimited image quota). Those are the defaults in Plans::Catalog, shown on /#pricing. A Stripe image_quota feature can replace the quota. The catalog has no per-image price.

WordPress + WooCommerce ready

Install the plugin, or sign images from the API

Keep featured images and Yoast or Rank Math fields when the card is a file. Use OG Pilot when the card has to be generated, from the plugin, an API key, or MCP.