WP Manifestindependent plugin directory
manifest / ai / ai-thumbnail-generator

AI Thumbnail Generator

WordPress Plugin that helps generating AI thumbnails.

by Nitya · github.com/nityasaha13/ai-thumbnail-generator · website

0stars
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/nityasaha13/ai-thumbnail-generator/archive/refs/heads/main.zip

A 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

  1. Download the plugin files
  2. Upload the ai-thumbnail-generator folder to the /wp-content/plugins/ directory
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Go to Media > AI Thumbnail to configure settings

Via WordPress Admin

  1. Go to Plugins > Add New
  2. Click "Upload Plugin"
  3. Choose the plugin zip file
  4. Click "Install Now"
  5. Activate the plugin

Configuration

Settings

  1. Navigate to Media > AI Thumbnail in your WordPress admin
  2. Select which post types should have the AI thumbnail generator available
  3. 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

  1. Create or edit a post/page
  2. In the sidebar, find the AI Thumbnail Generator widget
  3. Click Generate AI Thumbnail
  4. Enter a description of the image you want (e.g., "A beautiful sunset over mountains with vibrant colors")
  5. Click Generate Image
  6. Wait for the AI to create your image
  7. If you don't like it, click Regenerate to try again
  8. 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

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.