Gemini Images
Generate featured images using Google Gemini AI based on post content
★ 1stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/devwael/gemini-images/archive/refs/heads/master.zipReadme
Gemini Images WordPress Plugin
A WordPress plugin that uses Google's Gemini AI to generate featured images based on post content.
Features
- AI-Powered Image Generation: Automatically generate featured images using Google Gemini AI based on your post content
- Works with All Post Types: Compatible with all WordPress post types (posts, pages, custom post types)
- Dual Editor Support: Works seamlessly with both Gutenberg (block editor) and Classic Editor
- SEO-Friendly: Automatically saves captions with generated images for better SEO
- Flexible Settings: Configure API key, system prompts, resolution, and aspect ratio
- Smart Image Management: Option to save all generated images to media library even if not selected
- Secure: Follows WordPress coding standards with proper nonce verification and sanitization
Installation
- Upload the
gemini-imagesfolder to/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Settings > Gemini Images to configure your API key
Configuration
Getting Your API Key
- Visit Google AI Studio
- Create a new API key
- Copy the API key and paste it in the plugin settings
Settings
- API Key: Your Google Gemini API key (required)
- System Prompt: Optional prompt that will be prepended to all image generation requests
- Default Resolution: Set the default resolution for generated images
- Default Aspect Ratio: Set the default aspect ratio for generated images
- Save All Generated Images: When enabled, all generated images are saved to the media library even if not selected as featured image
Usage
Gutenberg Editor
- Open any post or page in the Gutenberg editor
- Click on the "Gemini Images" option in the sidebar (or use the three dots menu)
- Optionally enter a custom prompt
- Select resolution and aspect ratio
- Click "Generate Image"
- Preview the generated image and click "Set as Featured Image" to use it
Classic Editor
- Open any post or page in the Classic editor
- Look for the "Generate Featured Image with Gemini" meta box in the sidebar
- Optionally enter a custom prompt
- Select resolution and aspect ratio
- Click "Generate Image"
- Preview the generated image and click "Set as Featured Image" to use it
Requirements
- WordPress 5.8 or higher
- PHP 7.4 or higher
- Google Gemini API key
Security
This plugin follows WordPress security best practices:
- Nonce verification for all AJAX requests
- Capability checks for user permissions
- Data sanitization and validation
- Proper escaping of output
- Secure file upload handling
Support
For support, visit www.bbioon.com
Changelog
1.0.0
- Initial release
- Gutenberg editor integration
- Classic editor integration
- Settings page with API key configuration
- Image generation with captions
- Support for all post types
License
GPL v2 or later
Author
Ahmad Wael - www.bbioon.com