AI & WordPress

Nano Banana: AI Image Generation Inside WordPress

Stop alt-tabbing to external AI tools. Generate and edit images with natural language prompts — directly in the WordPress editor, saved straight to your Media Library.

Google Gemini
Gutenberg Block
Text-to-Image
Image Editing
WordPress Plugin
3 Models
Speed, Quality, or Balance
~$0.02
Per Image Starting Cost
Up to 4K
Image Resolution Output

The Problem With AI Images in WordPress Today

Every WordPress site needs images. Blog headers, product shots, hero graphics, social cards — the demand never stops. The current workflow looks like this: open a separate AI tool, generate an image, download it, switch back to WordPress, upload it, insert it into the post. Repeat for every image.

It’s not that AI image generation is hard. It’s that the workflow is fragmented:

Context switching kills flow. You’re writing a blog post, you need an image, you leave the editor, open another tool, lose your train of thought, come back 10 minutes later.
Images live outside your CMS. Generated images sit in a downloads folder or a third-party dashboard. They’re not in your Media Library. They have no metadata. They’re not searchable.
Editing requires round-trips. Want to tweak an existing image? Download it from WordPress, upload it to an AI tool, edit it, download again, re-upload. Four steps for one change.
No audit trail. Which prompt generated which image? What model was used? How much did it cost? Without history, you can’t reproduce or iterate on results.

Nano Banana solves this by putting image generation where the images are used — inside WordPress.

How It Works

Nano Banana gives you two ways to generate images — a dedicated admin page and a Gutenberg block — both powered by Google’s Gemini image generation models.

Generate From the Admin Page

Navigate to Media > Generate Image. Type your prompt, select a model, choose your aspect ratio and size, and hit generate. Results appear in a grid. Click “Save to Media Library” on any image you want to keep — it’s stored as a full WordPress attachment with the prompt, model, and timestamp as metadata.

Generate From the Block Editor

Add the Nano Banana block in the Gutenberg editor. Describe the image you need, generate it, and click “Insert Image.” The block replaces itself with a standard core/image block — no proprietary markup, no vendor lock-in. The image is in your Media Library and your post in one step.

Edit Existing Images

Open any image in your Media Library and you’ll see an “AI Edit” field. Type what you want changed — “remove the background,” “convert to watercolor,” “add a sunset behind the mountains” — and the plugin sends your image plus the instruction to the API. Save the result as a new attachment or replace the original.

Three Models, One Plugin

Not every image needs the same model. A quick blog thumbnail doesn’t need the same horsepower as a hero graphic. Nano Banana gives you three options:

Model Powered By Cost / Image Best For
Nano Banana Gemini 2.5 Flash ~$0.02 Quick drafts, thumbnails, social cards
Nano Banana 2 Gemini 3.1 Flash ~$0.045 Blog headers, product shots (recommended)
Nano Banana Pro Gemini 3 Pro ~$0.08 Hero graphics, marketing materials, high detail

All three models support five aspect ratios (1:1, 16:9, 9:16, 4:3, 3:2) and four resolution tiers from 512px up to 4K. You can generate up to 4 images per prompt and keep the ones you like.

Built for WordPress, Not Bolted On

Nano Banana isn’t a generic AI tool with a WordPress wrapper. Every feature is designed around how WordPress actually works:

Media Library Native

Every generated image is saved as a full WordPress attachment — not a temp file, not an external link. It gets thumbnails, alt text, searchability, and all the features the Media Library provides.

Gutenberg-First

The image generator block inserts a standard core/image block. No shortcodes, no custom markup. If you deactivate the plugin, your images stay exactly where they are.

Generation History

Every prompt, model, timestamp, and user is logged in a dedicated table. Paginated, searchable, and deletable. Know exactly what was generated, when, and by whom.

Encrypted API Keys

Your Google API key is encrypted with AES-256-CBC before it’s stored in the database. It’s never exposed in page HTML, REST responses, or logs. Most plugins store API keys in plaintext — we don’t.

Image Editing Without Leaving WordPress

Generation gets the headlines, but image editing is where the plugin saves the most time in practice. Open any image in your Media Library and you’ll find an AI Edit field.

The editing workflow is natural language — describe what you want changed, and the model applies it:

# Remove the background and make it transparent
“Remove the background, keep only the product”

# Change the art style
“Convert this photo to a watercolor painting”

# Add or modify elements
“Add a dramatic sunset sky behind the mountains”

# Adjust for different contexts
“Make this image darker and more dramatic for a blog header”

You can save the edited image as a new attachment (keeping the original) or replace the original in place. The plugin tracks the source attachment, so you always have a breadcrumb back to the original image.

What You Need to Get Started

Nano Banana has minimal requirements — it’s designed to work on standard WordPress hosting without special server configurations:

WordPress

  • WordPress 6.4 or higher
  • PHP 7.4+
  • OpenSSL and cURL extensions

Google AI

  • Google AI API key
  • Billing enabled on Google Cloud project
  • Pay-per-use — no monthly subscription

Permissions

  • Admin: configure settings & API key
  • Editor: generate & edit images
  • Author: use Gutenberg block

Under the Hood

For the technically curious — Nano Banana is built with the same standards we apply to production infrastructure at 45Squared:

REST API architecture. The Gutenberg block communicates through three dedicated REST endpoints under the nano-banana/v1 namespace — generate, save, and edit. Each endpoint checks WordPress capabilities and verifies nonces.
Clean block architecture. The Gutenberg block is a React component that replaces itself with a standard core/image block on insertion. No rendering dependencies, no lock-in. Deactivate the plugin and your content stays intact.
Proper data management. Generation history lives in a dedicated database table with indexed queries and cached pagination. Attachment metadata stores prompts, models, and edit lineage. Full cleanup on uninstall.
i18n ready. All strings are translation-ready with WordPress text domains. The plugin ships with a POT file for localization.

Get Early Access to Nano Banana

Nano Banana isn’t in the WordPress plugin repository yet. We’re rolling it out to a limited group first. If you want AI image generation inside your WordPress site, reach out and we’ll get you set up.

Contact Us for Access

Or explore the AI Site Launcher — our full platform for AI-powered WordPress site creation.

2026-04-21T15:33:40-05:00
Go to Top