Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/kahunam/wp-plugin-test-001/archive/refs/heads/main.zipWordPress plugin to identify, generate, and manage featured images using Google Gemini AI.
Description
Featured Image Helper is a powerful WordPress plugin that helps you automatically generate and manage featured images for your posts using Google's Gemini AI. It identifies posts without featured images, generates high-quality images based on post content, and provides comprehensive management tools.
Features
Core Features
- Dashboard Widget: Display count of posts without featured images, breakdown by post type with quick action links
- Admin List Screen: Custom admin page under Media menu with filterable table by post type, category, and date range
- Gemini AI Generation: Generate images from post title, excerpt, or full content using various styles
- Batch Processing: Queue system using WordPress cron to process multiple images efficiently
- Bulk Actions: Set featured images from library, generate with Gemini, apply default fallback image
- Auto-Fill Rules: Automatically generate featured images on post publish or update
- SEO Enhancement: Auto-generate alt text and image titles via Gemini
- Debug Logging: Store and view last 3 API requests with detailed information
Prompt Styles
- Photographic: Professional, photorealistic images
- Illustration: Artistic, colorful illustrations
- Abstract: Modern abstract art
- Minimal: Clean, minimalist designs
- Custom: Define your own prompt template
Requirements
- WordPress 6.0 or higher
- PHP 7.4 or higher
- Google Gemini API key
Installation
- Upload the
featured-image-helperfolder to the/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Settings → Featured Image Helper to configure your API keys
- Start generating featured images!
Configuration
API Configuration
- Go to Settings → Featured Image Helper → API Configuration
- Enter your Google Gemini API key (get one from Google AI Studio)
- Test your API connection
Generation Settings
- Choose default prompt style
- Select content source (title, excerpt, or full content)
- Set default image size (default: 1200x630)
- Create custom prompt templates
Auto-Fill Rules
- Enable/disable automatic generation
- Set trigger (manual, on publish, on update)
- Select which post types to enable
Advanced Settings
- Configure batch size (1-20 images per batch)
- Set queue processing interval
- Configure log retention period
- Enable/disable debug logging
Usage
Generate Single Image
- Go to Media → Featured Images
- Find a post without a featured image
- Click "Generate Now"
- Wait for the AI to create your image
Bulk Generation
- Go to Media → Featured Images
- Select multiple posts using checkboxes
- Click "Add Selected to Queue"
- Images will be processed automatically based on your queue settings
Auto-Generation
- Enable auto-generation in Settings → Featured Image Helper → Auto-Fill Rules
- Select trigger (publish or update)
- Choose enabled post types
- New posts will automatically get featured images
Queue System
The plugin uses WordPress cron to process images in batches:
- Configurable batch size (default: 5 images)
- Configurable interval (default: every 5 minutes)
- Pause/resume functionality
- Progress tracking
- Email notifications on completion
Debug Logging
When enabled, the plugin stores:
- Last 3 API requests
- Timestamp and post information
- Prompt used
- API response status
- Error messages
- Generation time
Logs are automatically purged after 7 days (configurable).
Hooks & Filters
Actions
fih_before_generate_image- Fires before image generationfih_after_generate_image- Fires after successful generation
Filters
fih_prompt_template- Modify the prompt before sending to APIfih_image_generation_args- Modify API request argumentsfih_batch_size- Change batch processing sizefih_queue_interval- Change queue processing intervalfih_log_entry- Filter log data before saving
Security
- All forms use WordPress nonces
- Capability checks on all admin pages (
manage_optionsfor settings,edit_postsfor management) - API keys are encrypted using WordPress salts
- Rate limiting on generation requests
- All inputs sanitized and outputs escaped
- Prepared SQL queries
Performance
- Lazy load admin assets only on plugin pages
- Use transients for API responses (1 hour TTL)
- Async processing for batch operations
- Debounced AJAX requests
- Limited log storage
- Auto-cleanup of old logs
Database Tables
The plugin creates two custom tables:
wp_fih_queue- Stores batch processing queuewp_fih_logs- Stores debug logs
These tables are automatically removed on plugin uninstall.
Support
For bug reports and feature requests, please visit GitHub Issues.
Changelog
1.0.0
- Initial release
- Core image generation functionality
- Queue system for batch processing
- Dashboard widget
- Settings page with multiple tabs
- Debug logging system
- Auto-generation rules
- Multiple prompt styles
- SEO enhancements
License
This plugin is licensed under the GPL v2 or later.
Credits
Developed by [Your Name] Uses Google Gemini AI for image generation