Banana Imagine

Generate AI images directly in your image fields using Google Gemini API.

Version: 1.1.0
Repository: github.com/mxmsmnv/BananaImagine
Author: Maxim Alex
License: MIT

Banana Imagine is a ProcessWire module that enables high-quality AI image generation within your Pageimage fields using the Google Gemini API.

Features


  • Integrated UI: Seamless generation bar below your image fields.
  • Batch Generation: Generate up to 4 variations at once.
  • Smart Variations: Automatically adds subtle descriptors to batch prompts for variety.
  • Native Storage: Selected images are saved directly to the page using ProcessWire's native methods.
  • Clean Naming: Files are saved as [PageID]-[Timestamp].jpg.
  • System Prompt: Define a reusable base prompt in module settings, pre-filled into the input field on every page. Supports %fieldname% placeholders (e.g. %title%) that are automatically resolved from the current page's field values.

Installation


  1. Upload the BananaImagine folder to your /site/modules/ directory.
  2. Go to Modules > Refresh.
  3. Install Banana Imagine.

Configuration


  1. Obtain an API Key from Google AI Studio.
  2. Enter the key in the module settings.
  3. Optionally set a System Prompt — a base context pre-filled into the prompt field on every page. Use %fieldname% placeholders to inject page field values (e.g. Professional photo of %title%, white background).
  4. Select which image fields should display the Banana Imagine bar.
  5. Note: Google requires a linked billing account to use image-generation models.

How to Use


  1. Edit a page that has an enabled image field.
  2. Locate the yellow Banana Imagine bar.
  3. The prompt field will be pre-filled with the system prompt (if configured). Edit or extend it as needed.
  4. Choose the number of variations (1-4) and click Generate.
  5. Images will appear as they are processed.
  6. Click on the images you want to save. A yellow checkmark will appear on selected items.
  7. Save the Page. The selected images will be downloaded and added to your field permanently.

More modules by Maxim Semenov

  • Context

    Export ProcessWire site context for AI development (JSON + TOON formats)
  • Subscribe

    Newsletter subscription handler with lists, double opt-in, honeypot, rate limiting and unsubscribe link.
  • WireWall

    Advanced traffic firewall with VPN/Proxy/Tor detection, rate limiting, and JS challenge
  • Ichiban

    Comprehensive SEO module: meta/OG/schema, audit, redirects, revisions, email reports.
  • Page Markdown

    Export any page to a clean Markdown file. Adds an export button to the page editor.
  • Robots.txt

    Manage robots.txt file through the admin UI with presets and visual editor.
  • Plausible Analytics

    Plausible Analytics dashboard using Stats API v2 with page-edit widget, traffic trends chart, and geo/device tabs.
  • Legal Docs

    AI-powered legal document generator. Generates Privacy Policy, Terms of Use, Cookie Policy and more for 93 jurisdictions.
  • Collections

    Configurable page collections with table UI and REST API

All modules by Maxim Semenov

Install and use modules at your own risk. Always have a site and database backup before installing new modules.