The Simplest Way to Batch-Create 100 Image Variants for A/B Testing (Beginner-Friendly)
The Simplest Way to Batch-Create 100 Image Variants for A/B Testing π‘
By Dr. David Jones, PhD in Artificial Intelligence
If you're running A/B tests on your website or app and struggling with the mountain of image variants required to make real data-driven decisions β you don't need an army of designers. You just need a simple, repeatable pipeline that leverages AI to batch-generate 100+ unique image variants in minutes. This guide walks you through exactly how, step by step, without requiring any coding experience or expensive software licenses.
Why Batch-Generating Variants Matters π
A/B testing isn't just about flipping one button color from red to blue. When you're optimizing visual elements β product photos, hero banners, thumbnail crops, CTA backgrounds β the number of variables explodes quickly. Consider a modest e-commerce landing page: 3 hero image styles Γ 4 product photo angles Γ 2 background treatments = 24 unique combinations before you've even touched secondary sections.
To get statistical confidence at 95% significance with a typical conversion rate around 2β3%, each variant group needs roughly 1,000β2,000 visitors. With 100 variants in your test matrix, you're looking at 100kβ200k total impressions just to get one clean read. That's a lot of image assets to design, export, optimize, and upload β all before the first visitor clicks.
Traditional workflow: designer creates each variant manually β exports in multiple resolutions β optimizes file size β uploads via CMS or testing tool. Multiply that by 100 variants and you're looking at weeks of work for a single test cycle.
AI batch generation compresses this to under an hour. Let's see how.
The Core Idea: One Prompt, Many Seeds π²
Most modern image-generation models (Stable Diffusion, DALLΒ·E 3, Midjourney via API, or open-source alternatives like FLUX) accept a text prompt plus a numerical seed parameter. Here's the key insight:
If you fix your prompt and change only the seed value, the model produces different but style-consistent images every time.
That single mechanism β same prompt, different seeds β is 80% of what you need for variant generation. The remaining 20% is automation: looping through 100 seed values and saving each output systematically.
For a beginner, the simplest path requires zero coding. But if you're comfortable with a basic Python script (or even a spreadsheet + API calls), the whole thing takes about 30 lines of code end-to-end.
Step-by-Step Pipeline (No Code Required) β
Here's the exact workflow I'd recommend for someone who wants results today:
1. Define Your Variant Dimensions π―
Before generating anything, write down what you're varying. For example:
Dimension | Options to Test |
|---|---|
Composition | Centered product / Left-aligned / Full-bleed background |
Background color | White / Soft gradient (blueβpurple) / Textured fabric |
Lighting style | Studio flat light / Warm ambient / Dramatic side-light |
Overlay text | None / Price badge / "New" tag |
If you have 4 dimensions with 2β3 options each, your total variant count is the product of the option counts: e.g., 3 Γ 3 Γ 3 Γ 3 = 81 variants. Round up to 100 by adding a couple more background colors or composition tweaks.
2. Write Your Base Prompt π
Write one detailed prompt that captures your style but leaves room for variation. Example:
"Professional product photograph of [PRODUCT], centered on a clean white background, soft studio lighting, high detail, commercial quality, 800Γ600 pixels"
You'll create one prompt per dimension combination. For the example above (3 compositions Γ 3 backgrounds Γ 3 lighting styles = 27 unique prompts), you'd write 27 slightly different prompts. This is the most "manual" step β but it's a one-time cost, and each prompt takes about 30 seconds to adapt.
Pro tip: Use a spreadsheet. Columns: Variant ID | Composition | Background | Lighting | Prompt Text | Seed Range. Row per variant. This becomes your master tracking sheet for the entire test.
3. Batch-Generate with Any AI Image Tool πΌοΈ
You don't need an API key or server. Options in order of simplicity:
Option A β Midjourney (Web):
Open a new chat, paste your prompt
Generate 4 images per prompt (Midjourney's default grid)
Download each image individually
Repeat for all 27 prompts β ~108 images from the grids
Use a bulk downloader or save-as loop in your browser
Option DALLΒ·E 3 / Bing Image Creator:
Paste one prompt at a time, generate 4 variations per round
Slightly more manual, but free and no account friction
Option C β Stable Diffusion WebUI (Local, Free):
Load any SDXL or FLUX checkpoint
Set batch size = 10, iterations = 3 (gives you 30 images per prompt)
Use the "Batch" tab with a text file of all your prompts
Output folder auto-saves everything in
variants/directory
This local option is my top recommendation if you have an NVIDIA GPU. A 16GB VRAM card will churn out 100 images in roughly 8β12 minutes at 800Γ600 resolution. Free, fast, and fully private (your product photos never leave your machine).
4. Optimize & Organize π¦
Once you have your 100 images:
Resize: Use ImageMagick or any online tool to standardize dimensions (e.g., all at 800Γ600 for web, plus a 320Γ240 thumbnail set)
Compress: Target < 80KB per image (WebP format gets you there easily; most CMSs support it natively now)
Name systematically:
hero_centered_whitebg_studio_v1.png,hero_left_aligned_gradient_warm_v2.pngβ your naming convention becomes your data schema
A simple folder structure:
ab_test_images/
βββ hero_banners/
β βββ v001_...png
β βββ v002_...png
β βββ ... (Γ 34)
βββ product_shots/
β βββ v035_...png
β βββ ... (Γ 36)
βββ cta_backgrounds/
βββ v071_...png
βββ ... (Γ 30)5. Wire Into Your Testing Tool π
Optimizely / Google Optimize: Upload variants as image assets, create experiments with 100 arms (or split into logical sub-experiments of 25β40 each for manageability)
PostHog / Mixpanel: Reference images by URL in your feature flags or visual editor
Custom JS: A simple
arrayof 100 image URLs, randomized on page load
Practical note: Running all 100 variants simultaneously dilutes traffic. If you have ~50k daily visitors and need 2k per variant, split your 100 variants into 4 sequential waves of 25, each running for ~3 days. Total cycle: ~2 weeks to full significance across all 100.
Making the Variants Actually Useful (Not Just Pretty) π
Here's where most people go wrong: they generate 100 visually distinct images but don't map them back to testable hypotheses. Your spreadsheet should include a hypothesis column:
Variant | Image Style | Hypothesis | Metric Tracked |
|---|---|---|---|
v012 | Warm gradient bg + centered product | Warmer tones increase perceived trust for skincare products | Add-to-cart rate |
v034 | Full-bleed fabric texture | Textured backgrounds signal premium quality β higher AOV | Avg order value |
This turns your image folder into an experiment design document. When results come in, you're not just looking at "variant 37 won." You understand why β and can generalize the insight to your next test.
A Quick Complexity Comparison βοΈ
Approach | Time for 100 variants | Cost | Iteration Speed |
|---|---|---|---|
Manual design (Figma/Photoshop) | 3β5 weeks | $2,000β$8,000 per cycle | Days to tweak one image |
AI batch (local SD/FLUX) | 1β2 hours | ~$0 (electricity only) | Minutes to regenerate a subset |
AI batch (API-based) | 30 minutes + cost | $5β$20 in API credits | Seconds per regeneration |
The table above tells the real story: AI doesn't just save time. It changes your iteration velocity from weekly to hourly, which means you can test more hypotheses per quarter and find winners faster.
Common Pitfalls & How to Avoid Them β οΈ
Prompt drift. If you copy-paste prompts across tools, subtle wording differences shift the output style. Keep one canonical prompt document; reference it everywhere.
Resolution mismatch. If your test tool expects 800Γ600 but you generated at 1024Γ768, you'll get blurry scaling or awkward crops. Lock your resolution before batch generation.
Seed reuse across dimensions. If two different dimension combinations accidentally use the same seed + similar prompt, their outputs will look nearly identical β and your test loses a data point. Keep seeds unique per variant (e.g., v001 uses seeds 1β5, v002 uses 6β10, etc.)
Forgetting mobile crops. Desktop hero banners and mobile thumbnails need different aspect ratios. Generate in a slightly larger canvas (e.g., 1000Γ750) and crop for each breakpoint post-generation.
Where This Fits in Your Overall Testing Strategy π§
Batch image generation solves the production bottleneck, but it doesn't replace good experimental design. Before you generate your first image, answer these three questions:
What's my primary metric? (Conversion rate? Scroll depth? Time on page?)
How much traffic do I have per day? (Determines how many variants are statistically viable)
What's the decision threshold? (Do I need 95% significance, or is 80% acceptable for a low-stakes change?)
Answer those first, and your variant count isn't "100 because that sounds thorough." It becomes "42 because my traffic supports 42 arms at 95% confidence within two weeks." That's the difference between generating images and designing experiments.
The Bottom Line π‘
You don't need to be an ML engineer or a professional designer to batch-create 100 image variants for A/B testing. You need:
A clear variant matrix (spreadsheet, ~30 minutes)
One well-crafted prompt template per dimension combination (~1 hour total)
Any AI image tool β local or API-based (~1 hour of compute time)
A systematic naming and folder structure (~20 minutes)
Total: under 4 hours from blank page to a complete, upload-ready set of 100 test images. That's not a minor efficiency gain. For most teams, that difference between "we'll run this test next quarter" and "let's kick it off tomorrow" is the difference between making decisions on hunches and making them on data.
Start with one landing page. Pick your three highest-impact visual elements. Write your prompts. Generate. Test. Iterate. The images will come fast β the insight is what you're really after, and AI just gets out of the way so you can focus on it. π