Turn studio product shots into lifestyle scenes on new Shopify drafts
When a new draft product lands in Shopify, decide whether its photo needs a scene, then swap the plain backdrop for a lifestyle setting with Recraft before the listing goes live.
When Shopify emits a new product webhook (products/create), run an agent that decides whether the product's photo would benefit from a lifestyle scene and, if so, replaces the background with one generated from the product's own copy. The trigger is a Shopify webhook on the products/create event, so this fires the moment a product is created.
Step 1 — Pull the current product. Use Shopify Get Product with the ID from the webhook payload. Read status, title, body_html (description), tags, product_type, and the images array.
Step 2 — Filter. Skip and stop the run immediately if any of the following are true: status is not 'draft' (never touch active or archived products); the images array is empty (nothing to work with); the images array has more than one image (assume a merchandiser is already handling it). Only continue when the product is a draft with exactly one image.
Step 3 — Judge the photo. Have the agent look at the single image and decide whether it is a plain studio-style shot (white/gray/seamless backdrop, isolated product, no environmental context) that would visibly benefit from a lifestyle scene. If the photo is already a lifestyle shot, or is a diagram/illustration/packaging flat, stop the run without changes.
Step 4 — Compose the scene prompt. From the title, description, tags, and product_type, write a short scene description that fits the product (for example: a ceramic pour-over kettle -> 'sunlit modern kitchen counter with a linen napkin and a wooden cutting board, morning light through a window'). Keep the product itself unchanged; describe only the setting, lighting, and props.
Step 5 — Generate the new image with Recraft. Default path: call Recraft Replace Background with model recraftv3, passing the current product image URL and the scene prompt. If the subject is visually complex or the agent expects background detection to struggle (thin/wispy shapes, transparent materials, jewelry on a bust, clothing on a hanger), fall back to Recraft Generate Background with model recraftv3 for finer masking. Note: both endpoints require model recraftv3 — V4 is not supported for these edits.
Step 6 — Attach the new image to the product. Use Shopify Update Product to add the newly generated lifestyle image as the product's primary image. Preserve the original studio photo by keeping it in the images array attached to a variant (variant_ids), so the file is never destroyed. Do not change status, title, description, tags, price, or inventory — only images. Do not publish the product; leave it in draft.
Guardrails: never operate on a product whose status is not 'draft'; never remove or replace an existing image outright — always append and reassign the primary; never touch a product with more than one existing image; if Recraft returns an error or the output looks degenerate, stop the run and leave the product exactly as it was. Log a one-line summary at the end (product id, action taken, whether replace or generate was used).
Additional information
What does this prompt do?
- Watches Shopify for newly created products and only acts on ones still in draft status, so live listings are never touched
- Looks at the current product photo and judges whether a plain studio shot would sell better with a lifestyle scene
- Uses the product's title, description, and tags to write a scene prompt and asks Recraft to swap the background, keeping the product itself intact
- Uploads the new lifestyle image to the product while preserving the original photo as a variant image, so nothing is lost
What do I need to use this?
- A Shopify store with access to your product catalog
- A Recraft account with a small balance of image credits
- Products that are created in draft status before going live, so the workflow has time to work
How can I customize it?
- Change the rule for which products qualify (for example only certain product types, tags, or collections)
- Adjust the style of the lifestyle scene, from bright and airy to moody, seasonal, or brand-specific
- Choose whether to auto-attach the new image or hold it for review before it lands on the product
Frequently asked questions
Will this ever change a product that is already live in my store?
Does it overwrite my original product photo?
What if a product already has multiple photos?
Can I trust the scene to look on-brand?
What happens if the product photo is hard to isolate from its background?
Related templates
Ship every new product with a scene, not a studio backdrop.
Give every draft product a lifestyle hero image before it goes live, without touching a single active listing.