/

·

No. 147

How to Swap a Product Into an Existing Photo With AI

·

by

A silver bowl and spoon on a gray studio table

Key takeaways

  • Start with a sharp, well-lit product photo with the label readable. AI can't repair a poor source image.

  • Match the scene before you generate. The direction of the light, its warmth and the size of nearby objects decide whether the swap looks real.

  • Tell the model what to keep identical. Google's own prompting guide recommends being explicit about what must stay the same.

  • Labels and logos are the most common failure. Photoroom found distorted labels or logos in 20.1% of the generations in its own test of 3,400.

  • Check every result against the real product, and reshoot when the image must show exact materials, fine print or a person handling the item.

What you need

  • A scene photo, such as a person holding a mug, a shelf or a desk.

  • Two to four photos of the product from different angles, ideally on a clean background.

  • The product's real dimensions and materials, which you can copy from its product page.

  • The brand logo as its own file if the label matters.

  • An AI image editor that accepts reference images. The tools at the end of this guide all do.

Step 1: Prepare the product photos

Use sharp, evenly lit shots where the shape, color and label are readable. Photoroom's advice is to check color, shape, proportions, materials, labels and logos before you start, and to supply more angles if the result needs to show sides the photo doesn't capture. Save the logo separately and write down the real size, such as "about 4 inches tall."

Step 2: Read the scene

Look at the photo before you touch a tool and note four things.

1. Light direction. Which side is the light coming from, and is it hard or soft?

2. Color temperature. Is the light warm like a lamp or cool like a window?

3. Camera angle. Is the camera above, level or below the surface?

4. Scale. What known objects, like a pen or a hand, show how big the product should be?

Mismatched light and scale give a composite away. Photoroom puts it plainly, saying scale matters as much as light.

Step 3: Tell the model to replace only the product

Upload the scene as the image to edit and the product photos as references. Then write the instruction in three parts, which follows the structure in Google's Nano Banana prompting guide: the reference images, how they relate and the new scenario.

A prompt you can adapt:

> Replace the mug on the desk in the first image with the bottle shown in the other images. Keep the lighting, composition, color grade and camera angle exactly the same. Match the placement, orientation and scale of the original mug, about 30% of the frame width.

Tell the model what to keep. Without that line, models often change the background, the hands or the color of the light as well.

Step 4: Run a few variations and check the details

Generate three or four versions and view them full screen. Then look for the usual problems.

Problem

What to try

Label or logo is warped

Add the logo as a separate reference, pick a model with good text rendering or paste the real label over the result in an editor

Product is the wrong size

Paste the real dimensions into the prompt and state the size as a share of the frame

Lighting doesn't match

Say "keep the lighting of the original photo" and regenerate, or use a harmonizing tool

Product floats

Add a contact shadow where it meets the surface

Angle looks wrong

Supply a product photo shot from a similar angle to the scene

Rest of the photo changed

Use a masked edit so only the product area is regenerated

Hand holding the product looks wrong

Re-roll, fix the hand area separately or reshoot

Correct with one specific line, such as "make it a little smaller and move it left," instead of rewriting the whole prompt.

Step 5: Fix the shadow and finish

Real objects have a contact shadow where they touch the surface and a softer cast shadow across it. If the tool didn't add them, paint or generate them on a separate layer so you can adjust the strength. Then compare the product against the real item for color, proportions and text, and fix anything that's off.

When AI is the wrong tool

Photoroom's own list of cases where a real photoshoot is better includes brand-defining campaigns, accurate interaction between a person and a product and precise material behavior. It calls a wrong label or color a product accuracy problem, not a cosmetic one. Reshoot or composite the real photo for nutrition panels, ingredient lists and other fine print, and check any marketplace rules before you list a generated image.

Tools to try

All of these accept reference images. Pick the one that fits the tools you already use.

  • Photoshop with Harmonize. Place the product on its own masked layer, then select Harmonize to match the lighting, color and tone of the scene. It can add shadows and reflections and costs one generative credit per generation. It doesn't fix scale or placement, so position the product yourself first.

  • Gemini with Nano Banana Pro. Upload the scene and up to 14 reference images in chat and describe the swap. You re-attach the product references each time you start a new edit.

  • ChatGPT Images. Edit through conversation and ask for one element to change while the subject and composition stay. It works well for quick tests before you move to a bigger workflow.

  • Melius. You can add the scene and a product shot to a canvas, set an image-to-image node to Nano Banana Pro at 2K and send the scene as the image input with the product as context. Paste the product page link so the dimensions, materials and colors are saved as text, add the logo as its own node, and use GPT Image for legible packaging text.

  • FLUX.2. Black Forest Labs says FLUX.2 takes up to 10 source images at once in its playground, with 8 through its API on the larger models.

Frequently asked questions

How do I put a product into an existing photo with AI?

Upload the scene photo and clean product photos to an AI editor that accepts reference images, then tell it to replace the object while keeping the lighting, composition and camera angle the same. Generate several versions and check the label against the real product.

What is the best prompt for swapping a product into a photo?

State the reference images, the relationship and the new scenario, and say what must stay identical. For example, ask it to replace the mug in the first image with the bottle in the others, keep the lighting and angle the same and match the original's size.

Why does the product look fake in the new photo?

The usual causes are mismatched light direction or color temperature, the wrong scale and a missing contact shadow. Read the scene's lighting first, give the product's real dimensions and add a shadow where it touches the surface.

How do I stop AI from distorting the label?

Add the logo as a separate reference, use a model that renders text well and patch the real label over the result in an editor if needed. Distorted labels or logos appeared in 20.1% of generations in Photoroom's own 3,400-generation test.

Can AI keep the rest of the photo unchanged?

It can if you ask it to and use a masked or targeted edit. Google's prompting guide advises being explicit about what to keep exactly the same, and a full regeneration often drifts.

When should I reshoot instead of using AI?

Reshoot when the image must show exact materials, fine print, ingredient or nutrition labels, or a person handling the product. Check marketplace rules before you list a generated image.