This Chrome extension allows you to virtually try on clothing items you find while browsing online using Google's Gemini AI for realistic image generation.
- Virtual Try-On: Right-click any clothing image online and instantly see how it looks on you
- Avatar Generation: Create personalized avatar models from your photos
- Wardrobe Management: Save clothing items for later try-ons
- Outfit Gallery: View all your generated outfits in one place
- Chrome Browser (version 138+)
- Gemini API Key from Google AI Studio
- Visit Google AI Studio
- Create a new API key
- Copy the API key (keep it secure!)
- Download or clone this repository
- Open Chrome and go to chrome://extensions/
- Enable "Developer mode" (toggle in top right)
- Click "Load unpacked" and select this directory
- Click the extension icon in Chrome toolbar
- Enter your Gemini API key and click "Save API Key"
- Upload 3+ photos of yourself for avatar generation
- Select your gender (for sample outfit generation)
- Click "Generate Avatar" to create your personalized models
- Browse any website with clothing images
- Right-click on a clothing item
- Select "Try It On" from the context menu
- Wait for AI generation (opens popup with result)
- Right-click on interesting clothing images
- Select "Add to Outfit" to save to your wardrobe
- My Outfits: See all generated try-on results
- My Wardrobe: Browse saved clothing items
- Latest Try-On: View your most recent result
- Gemini 2.5 Flash Image Preview: For AI image generation
- Chrome Storage API: For storing API keys and user data
- Chrome Context Menus: For right-click functionality
The extension uses detailed prompts based on your New-Idea.md specifications:
- Avatar generation with 4 different poses
- Realistic clothing overlay with proper fit and drape
- White background and high-resolution output
- API keys (locally stored)
- Generated avatars
- Saved clothing items
- Generated outfit results
- User preferences (gender, selected avatar)
- All image processing happens through Google's Gemini API
- Your API key is stored locally in Chrome storage
- Images are converted to base64 for API transmission
- No user data is sent to external servers except API calls
- "API Key Required": Make sure you've entered a valid Gemini API key
- "Avatar Required": Complete the avatar setup process first
- Generation Failed: Check your API key validity and internet connection
- Gemini API has rate limits and token costs
- Monitor your usage in Google AI Studio
- Free tier has limited requests per minute
This extension is built with:
- HTML/CSS/JavaScript for the UI
- Chrome Extension APIs for browser integration
- Gemini REST API for AI image generation
- Open Props for consistent styling
manifest.json # Extension configuration background.js # Context menu and API integration popup.html # Main UI interface popup.js # UI logic and state management icons/ # Extension icons New-Idea.md # Original project specifications
This is a sample extension demonstrating AI-powered virtual try-on functionality. Feel free to extend it with:
- Multiple avatar support
- Outfit combination features
- Social sharing capabilities
- Enhanced styling options
This sample is provided as-is for educational purposes.