Chad Image Generator
Custom WordPress plugin for AI image generation using Chad Image API, with prompt input, model selection, temporary image uploads, and frontend result preview.
by Ilana Gagkoeva · github.com/ilana-gagkoeva/chad-image-generator
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/ilana-gagkoeva/chad-image-generator/archive/refs/heads/main.zipChad Image Generator for WordPress
A custom WordPress plugin for integrating the Chad Image API into a WordPress website.
The plugin adds an AI image generation form that allows users to generate images directly on the website using different Chad image models.
Features
- Custom WordPress plugin
- Shortcode-based generator form
- Prompt input
- Model selection
- Aspect ratio selection
- Size preset selection
- Upload up to 5 reference images
- Temporary image upload without saving files to the WordPress Media Library
- Automatic cleanup of temporary uploaded files
- AJAX-based generation flow
- Status polling via Chad Image API
- Generated image preview on the website
- API key stored in WordPress admin settings
Supported Models
The plugin supports multiple Chad Image API models, including:
- Gemini 2.5 Flash Image / Nano Banana
- Gemini 3 Pro Image / Nano Banana Pro
- Seedream 4
- Seededit 3
- Flux Kontext Pro
- Flux Kontext Max
- Flux Kontext Multi
- Imagen 4
- Imagen 4 Fast
- Imagen 4 Ultra
- Flux 1 Schnell
- Flux 1.1 Pro
- Flux 1.1 Pro Ultra
- Midjourney 5.2
- Midjourney 6
- Midjourney 6.1
- Midjourney 7
- GPT Image Low
- GPT Image Medium
- GPT Image High
- Recraft V3 SVG
How It Works
- The user enters a text prompt.
- The user selects an image generation model.
- The user optionally uploads reference images.
- Uploaded images are stored temporarily outside the WordPress Media Library.
- The plugin sends a request to the Chad Image API.
- The API returns a
content_id. - The plugin checks the generation status using the API check endpoint.
- When the generation is completed, the generated image URLs are displayed on the website.
- Temporary uploaded files are deleted after generation is completed, failed, or cancelled.
Shortcode
Add the generator form to any WordPress page using:
[chad_image_generator]
Installation
- Download or clone this repository.
- Copy the plugin folder into your WordPress plugins directory:
wp-content/plugins/chad-image-generator/ - Go to WordPress Admin → Plugins.
- Activate Chad Image Generator.
- Go to Settings → Chad Image Generator.
- Add your Chad Image API key.
- Add the shortcode to any page.
API Key Security
The API key is stored in the WordPress admin settings.
The API key is not exposed in frontend JavaScript and should never be committed to this repository.
Temporary File Handling
Uploaded user images are not saved to the WordPress Media Library.
For models that require image URLs, images are temporarily stored in:
wp-content/uploads/chad-temp/
Temporary files are deleted after the generation status becomes:
completedfailedcancelled
Old temporary files are also cleaned up automatically.
Requirements
- WordPress
- PHP 7.4 or higher
- Active Chad Image API account
- Valid Chad Image API key
- Server permissions to write to the WordPress uploads directory
Notes
This plugin is a custom integration prototype and is not an official Chad product.
License
All rights reserved.
This code is provided for demonstration and portfolio purposes only.
You may not copy, modify, distribute, sell, sublicense, or use this code in any project without explicit written permission from the author.