Skip to main content
January 20, 2026
Answered

Batch background removal and auto-layer separation for product sets

  • January 20, 2026
  • 4 replies
  • 225 views

Currently, when working with images that contain multiple products or elements on a white background, such as a set of packaged goods, icons, or objects, users must manually remove the background and then cut out each item into separate layers. This process is time-consuming and repetitive.

I propose a feature that automatically detects multiple objects in a single image, removes the background, and places each detected object onto its own layer with one click. This could work similarly to Select Subject or Remove Background, but applied to all objects in the image simultaneously.

4 replies

Stephen Marsh
Community Expert
Community Expert
January 21, 2026

One option, this is possible to semi-automate or perhaps fully automate using a couple of different scripts (combined via an action or the code combined in a single script).

 

First, a simple action or script to convert the white background to transparency:

 

 
Next, a script to convert isolated pixels on a transparent background to separate layers, isolating each individual object:
 
 
 
Both of these scripts use an interface, however, that could be removed with values hard coded in.
 
Or a custom script could be written to work with a white background...
Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
January 21, 2026
January 21, 2026

Amazing scripts thank you very much for sharing them and your time! But if so many people are using these scripts and they are not perfect why wouldn't photoshop has a button for this or a simple checkmark to do all these for us 🙂 

Legend
January 20, 2026

I'm a working pro product photographer and if the image is shot properly, none of this takes much time. I have a bunch of scripts and actions, I don't even use Select Subject. You could script some of what you want.

January 20, 2026

@creative explorer You wouldn't use that on these kind of images because background removal tool already works on these kind of images. I am talking about stock images where like there are 10-20 different products on a white background. each one of them is seperated from each other already but you need to divide them into their own layers to use on designs.

creative explorer
Community Expert
Community Expert
January 21, 2026

@25720370 that's my my point exactly. Maybe  don't want 20 separate layers, maybe I just want one. @ExUSA does make a great point. Creating scripts would be easier. 

m
creative explorer
Community Expert
Community Expert
January 20, 2026

@25720370 it sounds like a great idea, but I wouldn't want it because what happens if there is more than two objects. For example, a coffee cup and hand/arm holding it. It would create two layers, or maybe just one. 

creativeexplorer_0-1768903704573.png

 

m