AI Thumbnail Generator
WordPress Plugin that helps generating AI thumbnails.
by Nitya · github.com/nityasaha13/ai-thumbnail-generator · website
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/nityasaha13/ai-thumbnail-generator/archive/refs/heads/main.zipA WordPress plugin that generates AI-powered featured images for your posts using text prompts.
Description
AI Thumbnail Generator adds a convenient widget to your post editor that allows you to generate custom featured images using artificial intelligence. Simply describe what you want, and the plugin will create a unique image for you.
Features
- Easy to Use: Simple interface integrated into the WordPress post editor
- AI-Powered: Generates unique images based on your text descriptions
- Flexible: Works with any post type you enable
- Free APIs: Uses free image generation services (Pollinations.ai, Hugging Face)
- Media Library Integration: Automatically saves generated images to your media library
- Customizable: Choose which post types can use the feature
- WordPress Standards: Built following WordPress coding standards and best practices
Installation
Manual Installation
- Download the plugin files
- Upload the
ai-thumbnail-generatorfolder to the/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Media > AI Thumbnail to configure settings
Via WordPress Admin
- Go to Plugins > Add New
- Click "Upload Plugin"
- Choose the plugin zip file
- Click "Install Now"
- Activate the plugin
Configuration
Settings
- Navigate to Media > AI Thumbnail in your WordPress admin
- Select which post types should have the AI thumbnail generator available
- Choose your preferred image generation API:
- Pollinations.ai: Fast and reliable (recommended)
- PixArt-α: High-quality images via Hugging Face
Post Type Configuration
By default, the plugin is enabled for Posts. You can enable it for:
- Posts
- Pages
- Custom Post Types
Usage
Generating a Thumbnail
- Create or edit a post/page
- In the sidebar, find the AI Thumbnail Generator widget
- Click Generate AI Thumbnail
- Enter a description of the image you want (e.g., "A beautiful sunset over mountains with vibrant colors")
- Click Generate Image
- Wait for the AI to create your image
- If you don't like it, click Regenerate to try again
- When satisfied, click Set as Featured Image
Tips for Best Results
- Be specific in your descriptions
- Include details about style, colors, mood
- Mention the subject and setting
- Use descriptive adjectives
Example Prompts:
- "A modern minimalist office workspace with plants"
- "Abstract geometric pattern in blue and gold"
- "Vintage travel poster of Paris, art deco style"
- "Futuristic cityscape at night with neon lights"
Technical Details
Requirements
- WordPress 5.0 or higher
- PHP 7.2 or higher
- Internet connection (for API access)
File Structure
ai-thumbnail-generator/
├── ai-thumbnail-generator.php # Main plugin file
├── includes/
│ ├── class-aitg-settings.php # Settings page handler
│ ├── class-aitg-meta-box.php # Meta box UI
│ ├── class-aitg-ajax.php # AJAX request handler
│ └── class-aitg-image-generator.php # Image generation logic
├── assets/
│ ├── css/
│ │ └── admin-style.css # Admin styles
│ └── js/
│ └── admin-script.js # Admin JavaScript
└── README.md # This file
API Providers
Pollinations.ai
- Pros: Fast, reliable, no rate limits for basic use
- Cons: Limited customization options
- URL: https://pollinations.ai/
PixArt-α (Hugging Face)
- Pros: High-quality images, free inference API
- Cons: May have cold start delays, rate limits on free tier
- URL: https://huggingface.co/
Security
The plugin follows WordPress security best practices:
- Nonce verification for all AJAX requests
- Capability checks (edit_posts)
- Data sanitization and validation
- Secure file uploads
- No direct file access
Data Handling
- Generated images are saved to WordPress media library
- Images are tagged with "ai-thumbnail-generator" for easy identification
- All images are properly attached to their parent posts
- Base64 encoding is used for secure data transfer
Frequently Asked Questions
Is this plugin free?
Yes! The plugin itself is completely free, and it uses free API services.
Are there any limitations?
Free API services may have rate limits. If you experience issues:
- Try switching to a different API provider in settings
- Wait a few moments between generations
- Consider using the service during off-peak hours
Can I use this with custom post types?
Yes! Go to Media > AI Thumbnail and select which post types you want to enable.
Will this work with page builders?
Yes, the plugin works with the WordPress block editor (Gutenberg) and classic editor. Page builder compatibility may vary.
Can I edit the generated images?
Yes! Once saved to the media library, you can edit them like any other image using WordPress's built-in editor or external tools.
What happens if generation fails?
The plugin will display an error message. Common causes:
- Network connectivity issues
- API service temporarily unavailable
- Invalid prompt
Simply try again or switch API providers.
Changelog
1.0.0
- Initial release
- Pollinations.ai integration
- PixArt-α integration
- Settings page
- Meta box interface
- Media library integration
Support
For bug reports and feature requests, please contact the plugin author or submit an issue on the plugin's repository.
Credits
- Built with WordPress standards
- Uses Pollinations.ai API
- Uses Hugging Face Inference API
- Icons from WordPress Dashicons
License
GPL v2 or later
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.