WordPress Blog Thumbnail API — Auto-Generate Featured Images From Any Post Title
Every WordPress post needs a featured image. The default workflow — open Canva, drop the title into a template, export a 1200×630 PNG, upload it to the Media Library, set it as featured — takes ten to twenty minutes per post. For blogs shipping two or three times a week, it's the reason posts sit in Draft for days.
This page is the WordPress-specific version of the fix. The official ThumbAPI WordPress plugin drops a Generate button into every post sidebar; one click and a 1200×630 cover lands in the Media Library and gets set as the featured image. If you'd rather wire it in code, the REST endpoint works from wp_remote_post() or any small must-use plugin — same API, same result. Every claim below is grounded in the real plugin and the real endpoint — no invented features.
Ship a unique featured image on every WordPress post
Get a Free API KeyOr read the quickstart — first request in under 5 minutes.
What It Does
- Featured image on demand.One button in the post sidebar → a 1200×630 cover generated from the post title, uploaded to the Media Library, and set as the post's featured image.
- Three visual styles. Faceless (default), With Image (personal photo overlay), or With Logo (brand overlay). Toggle per post or set a channel default.
- 13 category hints. Bias the AI style with
tech-saas,business-finance,education-tutorial, and 10 more so the cover matches the post's niche. - WebP or PNG output. WebP by default (~40% smaller); PNG for legacy pipelines that need broad compatibility.
How It Works
Three steps. Under 30 seconds from clicking Generate to seeing the cover in the sidebar.
- Write a title. Save the draft.
- Click Generate in the ThumbAPI sidebar panel (block editor) or the ThumbAPI meta box (classic editor). Pick a style and a category.
- Cover appears.The generated 1200×630 image uploads to the Media Library and is set as the post's featured image automatically.
Behind the panel, WordPress calls the ThumbAPI /v1/generate endpoint with the title and options. For the raw REST integration (bypassing the plugin), the shape is the same as the Node.js integration guide — one fetch, one JSON payload:
<?php
add_action( 'save_post', function ( $post_id, $post ) {
if ( has_post_thumbnail( $post_id ) ) return;
if ( $post->post_status !== 'publish' ) return;
$res = wp_remote_post( 'https://api.thumbapi.dev/v1/generate', [
'headers' => [
'x-api-key' => THUMBAPI_KEY,
'Content-Type' => 'application/json',
],
'body' => wp_json_encode( [
'title' => get_the_title( $post_id ),
'format' => 'blogpost',
'outputFormat' => 'png',
] ),
'timeout' => 40,
] );
if ( is_wp_error( $res ) ) return;
$data = json_decode( wp_remote_retrieve_body( $res ), true );
$png = base64_decode( explode( ',', $data['image'] )[1] );
$upload = wp_upload_bits( sanitize_title( $post->post_name ) . '.png', null, $png );
if ( $upload['error'] ) return;
$attach_id = wp_insert_attachment( [
'post_mime_type' => 'image/png',
'post_title' => $post->post_title,
'post_status' => 'inherit',
], $upload['file'], $post_id );
require_once ABSPATH . 'wp-admin/includes/image.php';
$meta = wp_generate_attachment_metadata( $attach_id, $upload['file'] );
wp_update_attachment_metadata( $attach_id, $meta );
set_post_thumbnail( $post_id, $attach_id );
}, 10, 2 );Drop the file in wp-content/mu-plugins/, set THUMBAPI_KEY in wp-config.php, and every published post without a featured image gets one automatically. For the plugin version (no code), install "ThumbAPI" from WordPress.org — full walkthrough on the WordPress integration page.
Use Cases
- Solo bloggers publishing weekly. Every new post ships with a unique cover — no design queue, no template drift.
- Multi-author WordPress sites. Contributors hit Publish and the cover just exists. See the automated blog covers use case for the deeper pipeline (Ghost, Sanity, Contentful use the same shape).
- Agencies running WordPress client sites. Deploy the plugin across every client, set per-client brand logos, and stop billing hours for cover design.
- Blogs migrating off Squarespace/Ghost onto WordPress. Backfill the whole archive with the bulk thumbnail generation script — one CSV in, a folder of PNGs out.
Pricing
Pricing is metered in credits. A standard 1200×630 blog cover costs 10 credits. Add+2 credits per call for a saved logo overlay, another +2 for a custom reference set.
| Plan | Covers / month (approx) | Price |
|---|---|---|
| Free | 5 | $0 |
| Creator | 75 | $19/month |
| Pro | 250 | $49/month |
| Business | 1,000 | $199/month |
Free tier output carries a small watermark; Creator and up are watermark-free. See full pricing details.
Customisation Parameters
| Parameter | What it does |
|---|---|
format | blogpost (1200×630) is the standard blog cover — same size as the OG spec, so it doubles as the social share image. |
category | Niche hint biasing the style — tech-saas, business-finance, education-tutorial, and 10 more. Set per post or per WP category. |
useLogo | Overlays your saved brand logo. Upload it once in Assets → Logo and flip the flag per site or per post. |
customAssetsId | References a saved reference set (1–6 sample covers). Every generation is biased toward your palette and layout — the closest thing to a locked template without the maintenance. See custom assets. |
outputFormat | png or webp. WebP is smaller (~40%); PNG plays safer with legacy Media Library pipelines. |
Related Reading
- ThumbAPI WordPress plugin — the no-code path, install from WordPress.org.
- Automated blog covers use case — same pipeline for Ghost, Sanity, Contentful, and any headless CMS.
- Blog Cover API landing page — the format-focused hub, formats and pricing in one place.
- Thumbnail API with Node.js guide — for headless WordPress setups running Node in the middle.
FAQ
Do I need to write PHP to use the ThumbAPI on WordPress?
No. The official WordPress plugin handles the whole flow — paste your API key in Settings → ThumbAPI, and every post gets a Generate button in the sidebar that creates a 1200×630 cover, uploads it to the Media Library, and sets it as the featured image. If you prefer code, the REST endpoint works from a small must-use plugin or a wp_remote_post() call.
Is there a free tier that covers a normal blog?
Yes. The Free tier includes 50 credits per month with no credit card. A standard blog cover costs 10 credits, so the free tier covers 5 posts per month. Most solo bloggers shipping weekly stay inside it or step up to Creator ($19/month, 75 covers).
Does the plugin work with the block editor and classic editor?
Yes. The plugin adds a ThumbAPI panel to the sidebar in both editors. Generate a cover from any draft, pick a style (Faceless / With image / With logo) and a category, and the plugin uploads the image to the Media Library and attaches it as the featured image.
What size is the generated image?
1200×630 pixels — the standard blog cover / OG image size. It works as the WordPress featured image, the Open Graph preview on social shares, and the header image on most themes without needing a resize.
Can I regenerate a cover when I update a post?
Yes. From the ThumbAPI panel, click Generate again on any post — the new cover replaces the current featured image. There's no per-post lock, so you can iterate freely without spending credits on posts you haven't updated.
Does the plugin work with any WordPress host?
Yes. The plugin uses the standard WordPress REST API and Media Library, so it works on any host — WordPress.com Business, WP Engine, Kinsta, Cloudways, or a self-hosted install. Requires PHP 7.4+ and WordPress 6.0+.
Stop hand-designing WordPress featured images
Start Free — 50 Credits/MonthRelated Pages
No-code path — install ThumbAPI from WordPress.org and paste an API key.
Automated Blog CoversThe generic-CMS version of this pipeline — Ghost, Sanity, Contentful, Notion.
Blog Cover APIHub landing page for the blog cover format — formats, pricing, and framework-agnostic examples.
Bulk Thumbnail GenerationCSV-in / folder-out for backfilling a WordPress archive.
QuickstartFirst request in under 5 minutes — public test key available.
PricingFree tier + paid plans. Blog covers cost 10 credits each.