Skip to content
PressQueue

OG image generators: How to make share images automatically

Updated · 5 min read

PressQueue is a free WordPress plugin that shares your posts through Buffer. See how it works

When someone shares a link to your website, a social network may show a preview card with the page title, description, and image. An Open Graph image, often called an OG image, is the picture a page specifies for that preview. An OG image generator makes that picture automatically, usually by placing a post’s title on a background in a consistent design.

For WordPress publishers, PressQueue can generate a social image for each post and use it when sharing through Buffer. The same image can also appear in link previews when PressQueue sets the page’s Open Graph and X image tags. PressQueue creates each share image when you publish a post, so you do not have to design each one by hand.

What an OG image generator does

A generator puts details such as a post title or site name into a prepared design. Then it creates an image file that social networks fetch when someone shares the page.

The design can be simple: a colored background, the post title, and a small site name. A consistent layout helps readers recognize your posts, while a title that changes for each page makes the image relevant to that link. Keep the title short enough to read at preview size, and leave space around the edges so cropping does not cut off important text.

A common broad fallback size is 1200 × 630 pixels, which has a 1.91:1 aspect ratio. It suits Facebook’s wide link-preview format and is also recommended as a general social-card size in HTML/CSS to Image’s documentation. Networks display previews differently, so one image size is a starting point, not a guarantee that every network will show it the same way. Some guidance, for example, gives different dimensions for X cards, and networks can crop images differently.

How automatic image generation works

Most generators use one of three approaches. A website can render an image when a page needs it, create images during a site build, or generate them inside the publishing platform. Each approach requires a different amount of setup and creates the image at a different place and time.

A browser-based generator typically renders an HTML and CSS template, then takes a screenshot. That approach offers flexible layouts, but it needs a Node.js service that stays available or runs as a serverless function. CSS-Tricks’ overview of automatic social images describes this setup. Static sites can instead create images during a build; an Astro example generates a separate image for each blog post as the site is built.

For a WordPress site, generating the image inside the publishing workflow avoids setting up a separate rendering service. PressQueue draws a share image the first time a post needs one, then redraws it if the title or image style changes. It needs PHP GD with FreeType, which most hosts have. If the host lacks PHP GD with FreeType, PressQueue still shares the post with its text and link, but without the generated image.

Set up automatic share images with PressQueue

PressQueue is a free, open source WordPress plugin that shares your posts to social media through Buffer. Your WordPress site must allow plugin uploads and run WordPress 6.8 or newer and PHP 8.1 or newer. You also need a Buffer account connected to your social accounts.

Set the image design once in PressQueue under Settings > Social images. Choose a background, such as a gradient, pattern, photo, or your own image. Then set the font and text color, followed by the alignment and site name. A live preview shows how the design looks. PressQueue places each post title on the image and adds the site name beneath it.

Download pressqueue.zip from the PressQueue download page, then upload it in WordPress under Plugins > Add Plugin > Upload Plugin. Next, paste a personal Buffer API key from your Buffer settings. PressQueue has no Buffer login button and stores the key in encrypted form. Your Buffer channels appear as switches, which are off for new channels.

Create a sharing rule to choose which posts to share, which channels to use, what the message says, when to send it, and which image to include. One click creates the rule “Share every new post to all my channels.” Rules are off by default. Test a rule on recent posts before turning it on. You can choose the generated social image alongside options such as the featured image, an image picked in each post, or no image.

PressQueue can also use its generated image for the page’s og:image and twitter:image tags, so the image appears when someone shares the post link. This works with Yoast SEO, Rank Math, The SEO Framework, and Jetpack. Without an SEO plugin, PressQueue adds the tags itself. Choose whether to use the generated image on every post, only on posts without their own image, or not at all. If you set an image for an individual post in an SEO plugin, that image takes precedence.

Through Buffer, PressQueue sends to LinkedIn, X, Bluesky, Mastodon, Threads and Facebook. See the PressQueue documentation for setup details and the project code for the open-source plugin.

Check the preview before sharing

A social image works only if the page points to the correct file and the network can fetch it. The page’s og:image value should be a full image URL that includes the site’s domain. Adding the image’s dimensions and alternative text helps describe it and makes the page more accessible; the Open Graph platform support notes recommend both.

Preview crawlers sometimes keep an older image after you update a post. If Facebook still shows the old preview, use its Sharing Debugger to ask Facebook to fetch the page again, as described in Facebook image troubleshooting guidance. Check the result after changing your image style or SEO settings, and keep important text near the center of the image to reduce the risk of cropping.

In test mode, PressQueue records posts it would share but does not send them. Review those test results, then switch to Live when the rule and image look right. You can pause sharing later, and a “Never share” rule keeps specified categories, tags, or authors off social media even when another rule would share them.

More about link previews and social images