Sub topic 15
Testing which images perform
This chapter covers how to compare AI-generated image variants and decide which one works better. It assumes you have read the earlier chapters on creative briefs, iteration, channel formats, and quality review. It also assumes you know basic marketing metrics such as impressions, clicks, and conversions, and you can read simple Python.
Why test images at all
Generating images is cheap, so you can produce twenty variants in an afternoon. Choosing among them by taste is the weak point. A designer, a manager, and a customer often prefer different images, and the preferences of the people in the room rarely match those of your audience.
A test replaces opinion with evidence. You show different images to comparable groups of people, measure what they do, and keep the one that moves the number you care about. The creative brief already names that number. If the goal was "drive sign-ups for the spring trail-running promotion," the metric is sign-ups, not likes.
Testing also feeds back into generation. A result such as "images with a runner in motion beat images of an empty trail" becomes a new line in your brief for the next round.
Define the question before you generate
A useful test answers one question. Write it as a hypothesis with a metric before you make the variants.
- Weak: "Let's see which image looks best."
- Better: "A warm morning-light image will get a higher click-through rate than a cool overcast image, with everything else equal."
This connects to the iteration chapter. When you change one element at a time, a difference in results can be traced to that element. If variant A has a different subject, palette, and composition from variant B, you learn only that A beat B. You do not learn why.
Pick one primary metric and decide it in advance. Common choices:
| Goal | Primary metric | Notes |
|---|---|---|
| Awareness | Reach, video views, or engagement rate | Cheap to measure, weakly tied to revenue |
| Traffic | Click-through rate (CTR) | Clicks divided by impressions |
| Sign-ups or sales | Conversion rate or cost per acquisition | Needs enough conversions to be reliable |
| Email engagement | Click rate on the image or its link | Open rates are distorted by mail-client privacy features |
Secondary metrics, such as cost per click or time on page, help you interpret the result. They should not be used to rescue a test whose primary metric showed nothing.
Build variants that isolate one change
Use your structured brief to produce variants. Because the brief is a set of fields, you can copy it and change exactly one field.
import copy
BASE = {
"subject": "a trail runner on a forest path at sunrise",
"style": "clean lifestyle photography, shallow depth of field",
"palette": "warm gold and deep blue",
"composition": "runner on the right third, empty space at the top for a headline",
"avoid": "text, logos, identifiable real people",
}
VARIANTS = {
"control": {},
"cool_palette": {"palette": "cool blues and warm gray"},
"close_up": {"composition": "close-up of the runner's shoes on the trail, empty space at the top"},
}
def build_prompt(brief):
parts = [
brief["subject"],
brief["style"],
f"Color palette: {brief['palette']}",
f"Composition: {brief['composition']}",
f"Do not include: {brief['avoid']}",
]
return ". ".join(parts) + "."
for name, change in VARIANTS.items():
brief = copy.deepcopy(BASE)
brief.update(change)
print(f"{name}: {build_prompt(brief)}")Each variant differs from the control in one field. Keep a record of which prompt, seed (if your tool exposes one), and tool version produced each image. Without that record you cannot reproduce a winner or generate more like it.
Before launching, run every variant through the quality review checklist. A variant with a malformed hand or garbled background text can lose for reasons that have nothing to do with your hypothesis. Export all variants with the same crop, size, and file compression so technical differences do not leak into the result. Text overlays, headlines, and calls to action should also be identical across variants unless the text is the thing you are testing.
Choose a test design
There are three common designs.
- A/B test: two variants, one change. Easiest to read.
- A/B/n test: a control and several challengers. Faster for exploring, but each variant gets a smaller share of traffic, and the chance of a false winner rises with the number of comparisons.
- Multivariate test: several elements combined, such as image and headline. It needs much more traffic and is rarely justified for small campaigns.
Most platforms offer built-in tools. Ad platforms can split traffic between creatives, email tools can split a list, and landing page tools can split visitors. Know how your platform assigns traffic. Some ad platforms optimize delivery toward the early leader, so impressions are not split evenly. That is useful for spending money well, but it makes the platform's apparent winner less reliable as a clean experiment. If you need a fair comparison, use a platform's dedicated experiment or split-test feature, which usually holds the split even.
Decide sample size and duration up front
Small numbers fool people. If variant A gets 3 clicks and variant B gets 5, the difference is almost certainly noise.
Decide these before launch:
- The baseline rate you expect, such as a 1.2% CTR.
- The smallest improvement worth acting on, such as a relative lift of 20%.
- The sample size needed to detect that lift reliably.
Smaller baseline rates and smaller lifts both require more impressions. An online sample-size calculator for two proportions handles the arithmetic. As a rough sense of scale, detecting a lift from 1.0% to 1.2% CTR typically needs on the order of tens of thousands of impressions per variant.
Run the test for whole weeks when you can. Behavior differs between weekdays and weekends, so a test that runs from Tuesday to Friday can favor a variant by accident. Do not stop the moment one variant pulls ahead. Checking repeatedly and stopping at the first significant-looking result inflates false positives. Set the end condition in advance and stick to it.
Analyze the result
For click-through or conversion rates, a two-proportion z-test is a simple, standard check. The script below uses only the Python standard library.
from math import sqrt, erfc
def two_proportion_test(clicks_a, views_a, clicks_b, views_b):
rate_a = clicks_a / views_a
rate_b = clicks_b / views_b
pooled = (clicks_a + clicks_b) / (views_a + views_b)
se = sqrt(pooled * (1 - pooled) * (1 / views_a + 1 / views_b))
z = (rate_b - rate_a) / se
p_value = erfc(abs(z) / sqrt(2)) # two-sided
return rate_a, rate_b, z, p_value
rate_a, rate_b, z, p = two_proportion_test(
clicks_a=240, views_a=20000,
clicks_b=312, views_b=20000,
)
print(f"Control CTR: {rate_a:.2%}")
print(f"Challenger CTR: {rate_b:.2%}")
print(f"Relative lift: {(rate_b - rate_a) / rate_a:.1%}")
print(f"z = {z:.2f}, p = {p:.4f}")With these numbers the control converts at 1.20% and the challenger at 1.56%, a 30% relative lift. The p-value is below 0.05, so a difference this large would be unlikely if the two images performed the same.
Read the result carefully.
- A p-value is not the probability that B is better. It is how surprising the data would be if there were no real difference.
- Statistical significance is not business significance. A 2% lift that is statistically real may not justify a new production process.
- Look at the size of the effect and its uncertainty, not only whether it crossed a threshold. A lift somewhere between 5% and 55% is a very different finding from one between 28% and 32%.
- A non-result is a result. If two images perform the same, you can choose the cheaper or more on-brand one.
If you ran several challengers, apply a stricter threshold, such as dividing 0.05 by the number of comparisons (a Bonferroni correction), or treat a lone winner as a lead to confirm in a second test.
Common errors
- Changing several things at once. You cannot attribute the result.
- Unequal exposure. One variant ran on weekends and the other did not, or the platform favored one early.
- Testing too many variants on too little traffic. Each variant ends up with too few events to compare.
- Declaring a winner early. Early gaps usually shrink.
- Measuring the wrong thing. A striking image can raise clicks and lower conversions if it attracts the wrong audience or sets a promise the landing page does not meet. Track a downstream metric when you can.
- Ignoring audience segments. An image that wins overall may lose with a key segment. Segment cuts are exploratory, so confirm them with a follow-up test.
- Forgetting novelty and fatigue. A fresh image can gain attention from novelty and decline as the same audience sees it repeatedly. Watch performance over time, and rotate in new variants for long campaigns.
- Not recording what you learned. The value of a test is the rule you carry forward.
Turn results into a testing log
Keep a simple log so findings accumulate across campaigns.
{
"test_id": "spring-trail-2026-01",
"hypothesis": "Warm morning palette beats cool palette on CTR",
"channel": "Instagram feed, 4:5 portrait",
"variants": ["control_warm", "cool_palette"],
"primary_metric": "CTR",
"impressions_per_variant": 20000,
"result": {"control_warm": 0.0120, "cool_palette": 0.0156},
"decision": "Adopt cool palette; test close-up composition next",
"brief_update": "Default palette changed to cool blues and warm gray"
}The last two fields close the loop. The decision says what you will do, and the brief update changes the source document so future prompts start from what you learned. A log of a dozen tests will tell you more about your audience than any general advice about what makes a good image.
Exercise
You generate three images for a campaign. Image A shows a runner at sunrise, image B shows an empty trail at dusk with a different color palette, and image C shows the runner at sunrise with a different palette. You run all three and C wins. What can you conclude about palette, and how would you redesign the test?
Show answer
You can only compare A and C cleanly, because they differ in palette alone. If C beat A, that is evidence the palette matters. Image B changes subject, time of day, and palette at once, so its result cannot be attributed to any single element. Redesign by dropping B or by replacing it with a variant that changes only one field from the control, such as only the time of day. Also decide the primary metric, sample size, and end date before launching.
Exercise
A challenger image has 150 clicks from 10,000 impressions. The control has 130 clicks from 10,000 impressions. A teammate wants to stop and declare the challenger the winner. What should you check first?
Show answer
Check whether the difference could be noise. The rates are 1.5% and 1.3%, a relative lift of about 15%, but with only 130 and 150 clicks the gap is small relative to random variation. Run a two-proportion test, or compare against the sample size you planned before launch. If the planned sample has not been reached, keep the test running rather than stopping at the first lead.