Banana AI Generator
Plugin for WordPress using NanoBanana API
by Gagkoeva Ilana · github.com/ilana-gagkoeva/nanobanana-plugin
★ 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/ilana-gagkoeva/nanobanana-plugin/archive/refs/heads/main.zipBanana AI Generator for WordPress
A custom WordPress plugin that adds an AI image generation form to a WordPress site.
The plugin allows users to:
- enter a text prompt;
- upload up to 8 reference images;
- send the request to Banana/NanoBanana API;
- receive and display the generated image on the website.
Features
- WordPress shortcode form
- Prompt-based image generation
- Image-to-image generation with up to 8 uploaded images
- API key stored in WordPress admin settings
- AJAX-based frontend interaction
- Callback endpoint for receiving generation results
- Basic file validation for uploaded images
Shortcode
Add this shortcode to any WordPress page:
[banana_ai_generator]
Installation
- Download or clone this repository.
- Copy the
banana-ai-generatorfolder intowp-content/plugins/. - Go to WordPress Admin → Plugins.
- Activate Banana AI Generator.
- Go to Settings → Banana AI Generator.
- Add your Banana/NanoBanana API key.
- Add the shortcode to a page.
API Key Security
The API key is stored in WordPress settings and is never exposed in frontend JavaScript.
Do not commit API keys, .env files, or WordPress configuration files to the repository.
Development Notes
Current flow:
- User enters a prompt.
- User optionally uploads up to 8 images.
- WordPress uploads images to the media library.
- WordPress sends the prompt and image URLs to the API.
- API returns a task ID.
- WordPress waits for the callback or checks local task status.
- Generated image is displayed on the page.
Roadmap
- Save generated images to WordPress Media Library
- Add generation history
- Add user limits
- Add admin settings for default image size
- Add better error handling
- Add support for multiple API providers