How to Change a Photo Background With AI
Changing a photo background with AI looks simple until the model quietly alters your face, swaps your clothes, or leaves a pasted-on cutout edge. This guide walks through choosing the right source portrait, writing a tight preservation prompt, picking the right model, and fixing the most common artifacts.
Last updated:
Source photos and result
In this Pixmint GPT Image 2.5 example, the instruction intentionally changed both the park background and the olive T-shirt into a modern office and navy suit while keeping the same person. When you want to replace only the background and keep your original clothes, explicitly name your clothing in the preservation sentence as shown in the prompt templates below.


How to choose the right photos
- Keep the face large and sharp: Aim for a clear photo where the face takes at least 10% of the frame. In our 108-edit face-preservation test, tiny distant faces (under 30 px) and heavy low-light blur drifted far more than clear chest-up portraits.
- Watch the original lighting direction: If bright sunlight hits the left side of your face, ask for a new background lit from the same side (for example, 'soft window light from the left'). Mismatched light is the #1 reason an edit looks pasted on.
- Avoid busy hair overlaps when possible: Stray hairs crossing a cluttered high-contrast background are harder to separate cleanly than a portrait against an open sky or soft wall.
Step-by-step instructions
- Open Image to Image and upload your portrait as a reference image (JPG, PNG, or WebP up to 20 MB).
- Keep GPT Image 2.6 selected (the default on Image to Image at 6 credits per 1K edit) or switch to GPT Image 2.5 (4 credits, verified across our 108-edit test) for budget runs.
- Paste one of the prompts below, customize the new location and lighting, and explicitly list what stays unchanged (face, hairstyle, clothes, pose, framing).
- Generate one image first and zoom in on the hairline, jawline, and shoulder edges. If you want to refine the background further, restart from your original photo rather than stacking multiple edits on a generated output.
Copy-paste prompt templates
Main template:
Replace only the background with a softly lit modern office with blurred glass walls and warm daylight coming from the left. Keep the person's exact face, expression, skin texture, hairstyle, outfit, pose, and camera framing unchanged. Match the color temperature and rim light on the shoulders naturally to the new office environment.
Outdoor travel portrait:
Place the person from my reference photo on a quiet sunlit Paris street at golden hour, soft shallow depth of field. Keep their exact facial features, expression, hairstyle, and current clothing unchanged. Natural 50mm candid photo lighting.
LinkedIn / studio backdrop:
Replace only the background with a clean, softly graded warm grey studio backdrop. Keep the person's face, glasses, hair, clothing, and shoulders identical to the original photo. Soft even key light, no harsh shadows, natural skin texture without heavy retouching.
Which model works best
Need a pure flat white e-commerce or ID-style backdrop? Skip prompting and use the one-click Background Remover. For realistic lifestyle scenes, GPT Image 2.6 (6 credits, default on Image to Image) and GPT Image 2.5 (4 credits) are the safest picks; Nano Banana 2 (20 credits) excels at documentary realism when you explicitly lock pose and accessories; Seedream 5.0 Flash (6 credits) is fast for quick composition drafts. See the full 108-edit likeness test.
Common issues and how to fix them
- Cutout / halo outline around hair: Simplify the new background (fewer busy objects behind the head) and add 'match ambient light and subtle color spill along the hair and shoulders.'
- Clothes or pose accidentally changed: Name your exact original top/jacket ('keep the grey hoodie and folded arms') rather than saying 'keep everything else.'
- Face looks slightly younger or airbrushed: Add 'preserve natural skin texture, pores, and original facial proportions without beautifying.'
Frequently asked questions
Can I change the background of a group photo?
Yes, as long as every face is clear. Explicitly say 'keep both people's faces, clothing, and positions unchanged' so the model does not drop or merge a secondary subject.
Should I use Image to Image or AI Image Editor for background swaps?
Use Image to Image when you want up to 4 reference photos, higher resolutions (2K/4K on paid accounts), or long ChatGPT prompts. Use AI Image Editor when you want to paint a brush mask so pixels outside the mask stay untouched.
Does Pixmint put a watermark on edited photos?
No. Every image made on Pixmint is watermark-free, whether you use your 20 free signup credits or a paid pack.
Make your own version
Open the tool and start with a photo you have permission to edit (20 free signup credits included).
Open image to image