Introducing the Nano Banana Image Generator Plugin for Sanity Studio



I'm absolutely thrilled to announce the release of my new Sanity plugin: Gemini AI Image Generator! This has been a labor of love, and I can't wait to share what it can do for your content workflow.
What is it?
If you're using Sanity Studio for content management, you know how crucial great imagery is for your projects. This plugin brings the power of Google's Gemini 2.5 Flash Image model directly into your Sanity Studio interface. It appears right alongside your familiar Upload and Unsplash options in the image picker—no context switching, no external tools, just seamless AI-powered image generation exactly where you need it.
Why You'll Love It
Two Powerful Modes
The plugin offers two distinct ways to create stunning imagery:
1. Text-to-Image Generation: Describe what you want, and watch it come to life. Whether you need product photography, hero banners, or social media graphics, just type your vision and generate.
2. Image-to-Image Editing: This is where things get really exciting! Upload an existing photo and transform it with AI. Change backgrounds, add lighting effects, remove clutter, create color variants—all while keeping your original subject intact.
It Just Works
Setup is ridiculously simple. Install the package, add it to your Sanity config, create a single API route, drop in your Gemini API key, and you're done. The whole process takes maybe 5 minutes. And because the plugin uses an adapter pattern, it works seamlessly with Next.js, Vercel Functions, Netlify Functions, AWS Lambda—you name it.
Real-World Use Cases
Let me walk you through some scenarios where this plugin absolutely shines:
Product Photography Made Easy
Imagine you're managing an e-commerce site. You've got a product photo, but it's on a cluttered desk with bad lighting. With the "Remove Background" template, you can instantly isolate the product on a clean white background. Want to go further? Use "Luxury Background" to place that same product on a marble surface with gold accents and sophisticated lighting. Same product, completely different vibe, zero photoshoot required.
Or start from scratch with the "Product Photography" template: "A high-resolution, studio-lit product photograph of a smartwatch on a pure white background. The lighting is a three-point softbox setup to eliminate harsh shadows. The camera angle is slightly elevated to showcase the product's features."
Lifestyle and Context Shots
Need to show your product in action? The "Lifestyle Scene" edit template takes your product photo and places it in a realistic modern home setting. Or use the "Lifestyle Photography" generation template to create authentic scenes from the ground up.
Picture this: You're promoting a coffee mug. Generate a cozy morning scene with natural lighting, the mug in use, warm and inviting—perfect for your marketing materials. The template creates that authentic, relatable feeling that stock photos often miss.
Seasonal and Themed Content
Running a holiday promotion? The "Seasonal Theme" edit template lets you add subtle seasonal decorative elements around your existing product shots. Transform your summer product line into a winter wonderland or add spring florals—all without reshooting.
Hero Images and Banners
The "Hero Banner" template creates cinematic, wide-angle images perfect for website headers: "A cinematic, wide-angle hero image featuring a mountain landscape at sunset. Dramatic lighting with soft backlighting creating depth. Professional photography with shallow depth of field. Aspirational and eye-catching."
Color Variants Without the Photoshoot
Testing different color options? The "Color Variant" template lets you change product colors while maintaining all other details. Show your customers what that bag looks like in navy, burgundy, or forest green—without photographing each variant.
Clean Backgrounds for Design Work
The "Minimalist Background" template creates clean compositions with tons of negative space—perfect when you need room for text overlays in your designs. Think landing pages, social posts, or presentation slides.
Lighting Magic
Transform ordinary photos with lighting effects:
- "Dramatic Lighting": Add cinematic shadows and highlights
- "Golden Hour Light": Bathe your subject in warm, sunset-glow lighting
- "Add Reflection": Create glossy surface reflections for that premium look
- "Water Droplets": Add fresh water drops for a refreshing, clean aesthetic
Social Media Graphics
The "Social Media Post" template generates bold, attention-grabbing graphics optimized for Instagram and Facebook. Vibrant colors, modern design, strong visual hierarchy—everything you need to stop the scroll.
Brand Storytelling
The "Brand Storytelling" template creates evocative, narrative-driven imagery that connects emotionally with your audience. Warm, natural tones with authentic, cinematic composition.
Power Features
Prompt Templates
You don't need to be a prompt engineering expert. The plugin includes pre-built templates for both generation and editing, covering everything from product photography to creative effects. Just select a template, customize if you want, and generate.
Guided Prompt Builder
Prefer to build your own prompts? The prompt builder walks you through selecting:
- Subject: What you want to generate
- Style: Photorealistic, minimalist, artistic, illustration
- Lighting: Natural, studio, dramatic, golden hour
- Camera Angle: Eye-level, elevated, low-angle, aerial
- Mood: Neutral, warm, cool, energetic, serene
Multiple Aspect Ratios
Choose from 1:1, 16:9, 9:16, 4:3, 3:2, and more. Generate exactly the format you need for your platform.
Security First
Your Gemini API key stays server-side only. All generation requests go through your backend API routes, so there's no client-side exposure. It's secure by design.
The Technical Stuff
For my fellow developers: this is a monorepo with clean separation of concerns. The core plugin handles the Studio UI, while separate adapters handle the backend integration. Currently shipping with Next.js and serverless adapters, but the pattern makes it easy to add more.
The whole thing requires Node.js 20+, Sanity Studio v4, and a Gemini API key (which you can grab from Google AI Studio for free to start).
Let's Build Something Amazing
I built this plugin because I kept finding myself needing quick imagery for content projects, and the friction of switching between tools was killing my flow. Now, image generation lives right where my content does.
Whether you're building an e-commerce site, a blog, a marketing site, or anything in between—if you're using Sanity Studio, this plugin can save you hours of time and potentially thousands of dollars in photography costs.
Try it out, and let me know what you create! I'm genuinely excited to see how people use this.
Get Started
1 npm install sanity-plugin-gemini-ai-images sanity-plugin-gemini-ai-images-nextjs @google/genai
Check out the full documentation on GitHub or grab it from npm.
Happy generating!
Have questions or feedback? Found a cool use case? I'd love to hear about it—drop me a line or open an issue on GitHub!

