Integrations
WordPress Integration
Set up automatic Open Graph image generation for your WordPress site.
The Titlize WordPress plugin automatically generates Open Graph images for your posts and pages. When you publish content, the plugin creates a beautiful social preview image using your post title and featured image.
Installation#
From WordPress Admin#
- Go to Plugins > Add New in your WordPress admin
- Search for "Titlize"
- Click Install Now, then Activate
Manual Installation#
- Download the plugin from titlize.com/wordpress (opens in new tab)
- Upload to
/wp-content/plugins/image-titler/ - Activate the plugin through the Plugins menu
Configuration#
Connect Your Account#
- Go to Settings > Titlize in WordPress admin
- Enter your API token from the Titlize dashboard (opens in new tab)
- Click Save Settings
Default Settings#
Configure default behavior for all posts:
| Setting | Description | Default |
|---|---|---|
| Auto-generate | Generate OG images automatically on publish | Enabled |
| Use featured image | Use post's featured image as background | Enabled |
| Default position | Text position on image | Bottom |
| Include subtitle | Use excerpt as subtitle | Disabled |
| Layout Template | Layout preset (Bottom Left, Left Side, Right Side, Split) | Bottom Left |
| Gradient Overlay | Apply tone-adaptive gradient for readability | Enabled |
| Text Shadow | Apply subtle text shadow for readability | Enabled |
| Font Size | Manual font size override (24–120), empty for auto | Auto |
Usage#
Automatic Generation#
Once configured, the plugin automatically generates OG images when you:
- Publish a new post or page
- Update a post's title or featured image
- Manually trigger regeneration
Manual Generation#
To manually generate or regenerate an OG image:
- Edit the post or page
- Find the Titlize meta box in the sidebar
- Click Generate OG Image
- Preview and save
Post-Level Overrides#
Override default settings for individual posts:
1 // In your theme's functions.php 2 add_filter('image_titler_post_settings', function($settings, $post) { 3 if ($post->post_type === 'product') { 4 $settings['position'] = 'bottom-left'; 5 $settings['subtitle'] = get_field('product_tagline', $post->ID); 6 } 7 return $settings; 8 }, 10, 2);
Hooks and Filters#
Customize Generated Images#
1 // Modify title before generation 2 add_filter('image_titler_title', function($title, $post) { 3 return strtoupper($title); 4 }, 10, 2); 5 6 // Modify the background image 7 add_filter('image_titler_background', function($image_url, $post) { 8 // Use a custom image for specific categories 9 if (has_category('featured', $post)) { 10 return get_template_directory_uri() . '/images/featured-bg.jpg'; 11 } 12 return $image_url; 13 }, 10, 2);
After Generation#
1 // Run custom code after image generation 2 add_action('image_titler_generated', function($image_url, $post) { 3 // Clear any caches 4 wp_cache_delete('og_image_' . $post->ID); 5 6 // Log generation 7 error_log("Generated OG image for post {$post->ID}: {$image_url}"); 8 }, 10, 2);
Shortcodes#
Display the generated OG image in your content:
[image_titler_preview]With custom attributes:
[image_titler_preview width="600" class="og-preview"]REST API Endpoint#
The plugin adds a REST endpoint for headless WordPress setups:
GET /wp-json/image-titler/v1/generate/{post_id}Response:
1 { 2 "success": true, 3 "image_url": "https://storage.titlize.com/images/gen_abc123.png", 4 "width": 1200, 5 "height": 630 6 }
Troubleshooting#
Images Not Generating#
- Check API connection - Go to Settings > Titlize and verify "Connected" status
- Verify token - Ensure your API token is valid and not expired
- Check quota - Verify you haven't exceeded your monthly limit
- Debug logs - Enable WP_DEBUG and check
wp-content/debug.log
Wrong Image Displaying#
Social platforms cache OG images aggressively. Use these tools to refresh:
- Facebook: Sharing Debugger (opens in new tab)
- Twitter: Card Validator (opens in new tab)
- LinkedIn: Post Inspector (opens in new tab)
Performance Optimization#
Images are generated asynchronously to avoid slowing down post saves:
1 // Disable async processing (not recommended) 2 add_filter('image_titler_async', '__return_false'); 3 4 // Increase async timeout 5 add_filter('image_titler_timeout', function() { 6 return 60; // seconds 7 });
Uninstallation#
The plugin does not delete generated images when uninstalled. To clean up:
- Go to Tools > Titlize > Cleanup
- Select cleanup options
- Click Remove All Data
- Deactivate and delete the plugin
Support#
- Documentation: titlize.com/docs (opens in new tab)
- Support: support@titlize.com
- GitHub: github.com/imagetitler/wordpress-plugin (opens in new tab)
Next Steps#
- Configure Brand Kit for consistent styling
- Review API Reference for advanced usage