AI Product Image Generator Documentation
Installation
↑ Back to topRequirements
↑ Back to top- WordPress 5.8 or higher
- WooCommerce 7.0 or higher
- PHP 7.4 or higher
- Active Google Cloud account with Gemini API access
- SSL certificate (HTTPS) recommended for API communications
Installation Steps
↑ Back to top- Upload Plugin
- Download the plugin ZIP file from WooCommerce Marketplace
- Go to WordPress Admin > Plugins > Add New
- Click “Upload Plugin” and select the ZIP file
- Click “Install Now”
- Activate Plugin
- After installation, click “Activate”
- Or go to Plugins list and activate “AI Product Image Generator for WooCommerce”
- Initial Configuration
- Upon activation, you’ll see a notice to configure the plugin
- Click the configuration link or navigate to WooCommerce > AI Image Generator
Initial Setup
↑ Back to topGetting Your Google Gemini API Key
↑ Back to top- Create Google Cloud Account
- Visit Google AI Studio
- Sign in with your Google account
- Accept terms of service if prompted
- Generate API Key
- Click “Create API Key”
- Select existing project or create new one
- Copy the generated API key
- Store it securely – you won’t be able to see it again
- Enable Gemini API
- The Gemini Flash model should be automatically available
- Verify your API is working in Google AI Studio’s test interface
Configuring the Plugin
↑ Back to top- Navigate to WooCommerce > AI Image Generator
- Enter your Google Gemini API key
- Enable the plugin by checking “Enable AI Product Image Generator”
- Set your optional daily generation limit for cost control (if desired)
- Configure optional settings as needed
- Click “Save Changes”
Configuration
↑ Back to topGeneral Settings
↑ Back to topEnable AI Product Image Generator
- Master switch to enable/disable the plugin functionality
- When disabled, generation buttons are hidden but existing images remain
Google AI API Key
- Your Gemini API key from Google AI Studio
- Stored encrypted in WordPress database
- Required for image generation to work
Debug Mode
- Enables detailed logging for troubleshooting
- Logs stored in WooCommerce > Status > Logs
- Only enable when investigating issues
- Remember to disable in production
Using the Plugin
↑ Back to topGenerating Images for Individual Products
↑ Back to top- Navigate to Product Editor
- Go to Products > All Products
- Click “Edit” on any product
- Or create a new product
- Generate Image
- Scroll to the Product Gallery section
- Select an image or upload one
- Click “Generate AI Image” button
- Enter your custom prompt in the text field
- Wait for the AI to process your request
- Review Generated Image
- Image generation takes 15-30 seconds
- Generated image appears in product gallery
- Image can be saved to Media Library
- You can regenerate if not satisfied and adjust the prompt
Writing Effective Prompts
↑ Back to topYou manually enter prompts for each product. Effective prompts should include:
- Clear product description
- Style preferences
- Background settings
- Lighting conditions
- Composition details
Prompt Format Example:
"Product photography of wireless headphones, modern design,
professional lighting, white background, high quality, commercial style"
Customization Tips:
- Add style preferences: “minimalist”, “lifestyle”, “studio”
- Specify angles: “front view”, “45-degree angle”, “top-down”
- Include context: “on wooden table”, “held by model”, “outdoor setting”
- Define mood: “elegant”, “playful”, “professional”
Managing Multiple Products
↑ Back to topTo generate images for multiple products:
- Work Through Products Individually
- Navigate through your product list
- Generate images one at a time for better control
- Customize prompts for each product’s specific needs
- Plan Your Generation Strategy
- Prioritize high-value or featured products first
- Monitor API usage and costs in Google Cloud Console
- Set optional daily limits if you want cost control
Managing Generated Images
↑ Back to topIn Media Library:
- Generated images are tagged with “ai-generated” for easy filtering
- Filename format:
product-name-ai-[timestamp].jpg
- Alt text automatically set to product title
- Full WordPress media editing capabilities available
Image Quality:
- Resolution: Minimum 512×512 pixels, up to 1248px (varies based on generation)
- Format: JPEG
- File size: Maximum 4MB
- Optimized for web display
API Configuration
↑ Back to topUnderstanding API Costs
↑ Back to topGoogle Gemini API pricing (as of 2025):
- Very limited free tier
- Pay-as-you-go pricing after free tier
- Check current pricing at Google Cloud Console
Monitoring API Usage
↑ Back to top- In Google Cloud Console:
- Detailed API usage metrics
- Billing reports
- Set up billing alerts
API Error Handling
↑ Back to topCommon API responses:
429 Too Many Requests
: Quota exceeded401 Unauthorized
: Invalid API key400 Bad Request
: Invalid prompt format503 Service Unavailable
: Temporary API outage
Troubleshooting
↑ Back to topImages Not Showing in the Media Library After Saving
↑ Back to topWhen saving an AI-generated image to the gallery, the image will not show in the “Add Media” view, but it will in the “Create Gallery” view. This limitation is due to a bug in WordPress core that the plugin can’t bypass.
Images Not Generating
↑ Back to topCheck API Key:
- Verify key is correctly entered in settings
- Test key in Google AI Studio
- Ensure API is enabled in Google Cloud Console
Check Quotas:
- Check if optional daily limit is set and exceeded
- Check Google Cloud API quota limits
- Review billing status and payment method
Enable Debug Mode:
- Turn on Debug Mode in settings
- Attempt generation
- Check logs at WooCommerce > Status > Logs
- Look for file starting with
ai-product-image-generator-
Poor Image Quality
↑ Back to topImprove Prompts:
- Add more product details
- Include specific style keywords
- Avoid conflicting descriptions
- Use clear, descriptive language
Common Issues:
- Vague descriptions produce generic images
- Too many style keywords can confuse AI
- Contradictory terms (e.g., “vintage modern”) cause issues
Performance Issues
↑ Back to topSlow Generation:
- Normal generation time: 15-30 seconds
- Network latency affects speed
- API server load during peak times
- Bulk operations are not currently available – generate images individually
Plugin Conflicts:
- Disable other media management plugins temporarily
- Check for JavaScript errors in browser console
- Ensure WooCommerce is updated to latest version