Auto-generate stunning AI-powered featured images using OpenAI (DALL-E 3, GPT-4), Google Gemini, or Stability AI. Supports bulk generation, scheduling, and multiple formats.
- 🎨 Multiple AI Providers - Support for OpenAI (DALL-E 3, GPT models), Google Gemini, and Stability AI (Stable Diffusion 3, SeeDream)
- 🔑 Bring Your Own API Key - Complete control and transparency over API usage
- ⚡ Single & Batch Generation - Generate images one at a time, or bulk regenerate your entire library
- ✨ Bulk Regeneration - Regenerate all featured images in one click
- 🎚️ Image Quality Control - Choose between Standard, HD, or Low quality generation (OpenAI)
- 🖼️ Multiple Formats - Support for PNG, JPG, and WEBP (All Providers)
- 🎯 Customizable Prompts - Tailor the image generation to your brand
- 🔒 Secure - API keys are encrypted before storage
- 📏 Flexible Dimensions - Configure image size (default: 1024x675px)
- ✅ WordPress Standards - Built following WordPress.org coding standards
| Provider | Models | Quality Options | Output Formats |
|---|---|---|---|
| OpenAI | DALL-E 3, GPT Image 1, GPT Image 1 (Mini), GPT Image 1.5, GPT Image Latest | Standard, HD, Low | PNG, JPG, WEBP (Auto-converted) |
| Stability AI | Stable Diffusion 3, SeeDream 4.5 | N/A | PNG, JPG, WEBP (Native) |
| Google Gemini | Imagen 3.0 | N/A | PNG |
- Go to Plugins > Add New in your WordPress admin
- Search for "AI Featured Image Generator"
- Click Install Now and then Activate
- Download the latest release from GitHub Releases
- Upload the plugin folder to
/wp-content/plugins/ - Activate the plugin through the Plugins menu in WordPress
git clone https://github.com/gunjanjaswal/Featured-Image-Creator-AI.git
cd Featured-Image-Creator-AI
# Copy to your WordPress plugins directory
cp -r . /path/to/wordpress/wp-content/plugins/featured-image-creator-ai/- Navigate to Settings > AI Featured Images
- Select your preferred AI provider
- Get your API key:
- OpenAI: OpenAI Platform
- Google Gemini: Google AI Studio
- Stability AI: Stability AI Platform
- Enter your API key and save
- (Optional) Customize the prompt template
- Start generating images!
- Edit any post
- Look for the AI Featured Image meta box in the sidebar
- Click Generate Featured Image
- Wait for the image to be generated and automatically set
- Go to Posts > All Posts
- Select posts without featured images
- Choose Generate Featured Images from bulk actions
- Click Apply
- Go to Tools > AI Featured Images
- View the count of posts without featured images
- Click Generate All Featured Images
- Monitor the progress as images are generated
This plugin supports multiple AI providers. Pricing varies:
- Standard Quality: ~$0.04 per image (1024x1024)
- HD Quality: ~$0.08 per image (1024x1024)
- Current Pricing
- Check Google AI Studio for current pricing
- Free tier available with limitations
- ~$0.04 per image
- Current Pricing
The plugin uses standard quality by default for all providers.
- WordPress 5.8 or higher
- PHP 7.4 or higher
- API key from your chosen provider (OpenAI, Google Gemini, or Stability AI)
opensslPHP extension (for API key encryption)
ai-featured-image-generator/
├── ai-featured-image-generator.php # Main plugin file
├── includes/
│ ├── class-admin-notices.php # Admin notification system
│ ├── class-bulk-generator.php # Batch processing
│ ├── class-image-generator.php # Core image generation
│ ├── class-post-meta-box.php # Post editor integration
│ ├── class-security.php # Security utilities
│ ├── class-settings.php # Settings page
│ └── api/
│ ├── class-api-interface.php # API provider interface
│ ├── class-openai-provider.php # OpenAI DALL-E 3
│ ├── class-gemini-provider.php # Google Gemini (Imagen)
│ └── class-stability-provider.php # Stability AI (SD3)
├── assets/
│ ├── css/
│ │ └── admin.css # Admin styles
│ └── js/
│ └── admin.js # Admin JavaScript
├── readme.txt # WordPress.org readme
└── README.md # This file
// Modify the prompt before sending to API
add_filter('aifig_image_prompt', function($prompt, $post_id) {
// Your custom logic
return $prompt;
}, 10, 2);
// Modify image dimensions
add_filter('aifig_image_dimensions', function($dimensions) {
return array('width' => 1200, 'height' => 800);
});// After image is generated
add_action('aifig_image_generated', function($attachment_id, $post_id) {
// Your custom logic
}, 10, 2);
// Before batch generation starts
add_action('aifig_batch_start', function($post_ids) {
// Your custom logic
});# Clone the repository
git clone https://github.com/gunjanjaswal/Featured-Image-Creator-AI.git
cd Featured-Image-Creator-AI
# Create a symlink to your WordPress plugins directory
ln -s $(pwd) /path/to/wordpress/wp-content/plugins/featured-image-creator-aiThis plugin follows WordPress Coding Standards.
# Install PHP_CodeSniffer
composer global require "squizlabs/php_codesniffer=*"
# Check coding standards
phpcs --standard=WordPress .
# Auto-fix issues
phpcbf --standard=WordPress .- API keys are encrypted using AES-256-CBC before storage
- All user inputs are sanitized and validated
- Nonce verification on all AJAX requests
- Capability checks on all admin actions
- Prepared statements for database queries
This plugin sends post titles to your chosen AI provider's API to generate images. Please review:
OpenAI
Google Gemini
Stability AI
No other data is sent to external services. API keys are stored encrypted in your WordPress database.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- WordPress.org Support Forum: Plugin Support
- GitHub Issues: Report a Bug
- Email: hello@gunjanjaswal.me
If you find this plugin helpful, consider buying me a coffee ☕
This plugin is licensed under the GPL v2 or later.
Featured Image Creator AI
Copyright (C) 2024 Gunjan Jaswal
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- Developed by Gunjan Jaswal
- Powered by:
- Added
draft_to_publishandpending_to_publishhooks for auto-generating featured images - Previously only
future_to_publishwas hooked, so images were only auto-generated for WordPress scheduled (future) posts - Now auto-generates featured images when posts transition from draft or pending to published (e.g., via custom auto-publish systems, bulk publishing, or manual publish)
- Enabled error logging for auto-generation to aid debugging (
AIFIG:prefix in debug.log)
- Fixed fatal error by requiring file.php before calling wp_tempnam() in OpenAI provider
- Enable Output Format selection (PNG/JPG/WEBP) for OpenAI models (images are automatically converted)
- Updated documentation with full list of supported models and options
- Improved compatibility with GPT Image 1 (Mini)
- Added new image generation models: GPT Image 1, GPT Image 1 (Mini), GPT Image 1.5, GPT Image Latest
- Added SeaDream 4.5 support for Stability AI
- Added image quality settings (Standard/HD/Low) and output format selection (PNG/JPG/WEBP)
- Added Bulk Regeneration feature to regenerate images for all posts
- Fixed image dimension error for custom models
- Improved code quality and security (nonces, escaping)
- Added automatic featured image generation for scheduled posts
- Fixed author name spelling
- When a scheduled post is published without a featured image, one is automatically generated
- Initial release
- OpenAI DALL-E 3 integration
- Google Gemini (Imagen) integration
- Stability AI (Stable Diffusion 3) integration
- Single post image generation
- Bulk generation for posts without featured images
- Customizable prompt templates
- Encrypted API key storage
- WordPress.org standards compliance