This project is not covered by Drupal’s security advisory policy.

Overview

NanoBanana is an AI provider plugin for the Drupal AI module that integrates Google's Gemini image generation models. It supports both text-to-image and image-to-image generation with advanced features like multi-image composition, aspect ratio control, and high-resolution output.

With the Nano Banana Editor Module we have also a POC for a nicer editor experience


Features

  • Text-to-Image Generation: Generate images from text descriptions
  • Image-to-Image Transformation: Edit and transform existing images
  • Multi-Image Composition: Combine up to 14 images into composite scenes (model-dependent)
  • Aspect Ratio Control: 10 aspect ratio options (1:1, 3:4, 4:3, 9:16, 16:9, etc.)
  • High-Resolution Output: Up to 4K resolution with Gemini 3 Pro
  • AI API Explorer Integration: Built-in UI for testing with automatic multi-image field injection

Supported Models

Gemini 2.5 Flash Image
  • Speed: Fast, low-latency
  • Multi-Image: Up to 3 images (1 main + 2 additional)
  • Best For: Quick iterations, prototyping, real-time applications
Gemini 3 Pro Image (Preview)
  • Speed: Slower, higher quality
  • Multi-Image: Up to 14 images (1 main + 13 additional)
  • Resolution: 1K, 2K, 4K
  • Best For: Final production, high-quality output, complex compositions

 

Post-Installation

1. Configure API Key

Use the Key module to store your API key securely:

  1. Navigate to Configuration → System → Keys
  2. Add a new key with your Gemini API key
  3. Select it in the NanoBanana settings (/admin/config/ai/providers/nanobanana)

2. Verify Configuration

Navigate to AI API Explorer → Image-To-Image Explorer (/admin/config/ai/explorers/image_to_image_generator):

  • Select Provider: NanoBanana
  • The available models should appear in the dropdown
AI API Explorer

Text-to-Image

  1. Navigate to AI API Explorer → Text-To-Image Explorer
  2. Select Provider: NanoBanana
  3. Select Model: Gemini 2.5 Flash Image or Gemini 3 Pro Image
  4. Configure options:
    • Aspect Ratio: Choose from 10 options
    • Image Size: (Gemini 3 Pro only) Default, 1K, 2K, or 4K
  5. Enter your prompt
  6. Click Generate Image

Image-to-Image

  1. Navigate to AI API Explorer → Image-To-Image Explorer
  2. Select Provider: NanoBanana
  3. Select Model: Gemini 2.5 Flash Image or Gemini 3 Pro Image
  4. Upload main image
  5. Multi-Image: Upload additional images (fields appear automatically)
  6. Configure options and enter prompt
  7. Click Generate Image

 

Additional Requirements

 

Supporting organizations: 
Initial Development

Project information

Releases