We offer vinyl decals for many devices. To show what a design looks like on a device, we have to create a main layer of the device, having the place of where the skin would fit cut out for our background layer images to slide behind.enter image description here

We have 2,000+ designs to offer for each device, so this takes time. After we line up all the backgrounds as individual layers behind the main device window, we then have to save out each layer as its own png. This is a very time consuming process. Here's a test example of a few designs. enter image description here

Each background layer is titled corresponding to what the design is called. For example: The top layer here is called "Blue Vector Fish and Boat Pattern". How we do this now is we double click the layer title, so it allows us to "copy" the title (instead of typing it in).enter image description here

then we bring up a "save as" window and you will see our PSD file is currently save as "The (layer name) Skin for the Beats by Dre Solo 2 Headphones", enter image description here

so we will then need to put our layer title into the spot that currently says "(layer name):enter image description here

Then change the save type to PNG or JPEG.enter image description here

We then save out that design, delete the layer we just saved and duplicate our actions for the next layer in this case would be "Seamless Vector Gold Fish". enter image description here

Is there a way to create a custom script to automatically perform these repetitive actions? I am obviously doing the same thing over and over again. I would appreciate any help! We usually set up batches of 500 and save them out manually and it is brutal. Please contact me if you have any suggestions. Thanks!

  • Have you ever found a solution to this? This is a very important question. Jan 14, 2018 at 11:29
  • @MJoraid I don't know if you ever noticed the link I posted above your comment. I didn't really explain what it was and I see now that it would've been better if I had added "Possible duplicate:" text or something before the link. In there I've given a proper answer to what is basically an identical question.
    – Joonas
    May 31, 2018 at 9:02
  • @Joonas I actually have been using that script since the day I posted the comment (same popup window, but I can't really remember if I copied it from that answer or found a similar answer without bugs). So most likely I clicked your link, found the solution and forgot to come back here. I had single product design with around 35 names, so I used one script to import all names from TXT into each individual layer, and then used the proposed solution in your link to save each layer as its own JPEG. I just had to modify the naming variable to include my own format. It works great. Thank you. Jun 1, 2018 at 12:37
  • @MJoraid, that's good. Yea I remember thinking about the naming scheme when I wrote that script. I think the reason why I decided to not use the layer names for the naming scheme was the off chance that there are identical layer names and I didn't want to bother with that... The way I did it was slightly simpler... :)
    – Joonas
    Jun 1, 2018 at 12:50

3 Answers 3


File → Scripts → Export Layers to Files

Or in newer versions of Photoshop:

File → Export → Export Layers to Files

  • 1
    But this does not keep the main template layer switched on all the time. Am I missing something? Jan 14, 2018 at 11:35
  • 1
    lol this is why the SE answer boards are totally stupid, this isn't the answer to the question, but is the most upvoted answer because it is an answer to the question most people are looking for 'all layers' but this question is about keeping one layer/group active, which requires a script to do Nov 26, 2018 at 18:46

You should try this script that user Johannes graciously shared: https://graphicdesign.stackexchange.com/a/1962/24301

It's basically an improved version of the built-in PS "Export Layers to Files" script that allows (among other things) for saving the layers by their layer name. This will export all layers in your file as they are positioned keeping their name.

After that, I would open one of the layer images up and create an action for placing the top image (your "Group 1") over the current image, saving and closing. Then use the batch tool to apply that action to all your saved layer images.

  • Is there a way to record me copying the layer name? Aug 27, 2014 at 23:58
  • Not that I'm aware of but I don't believe you should need to with this method. The script should save the files with the layer names, and then if you just re-save the images in the action you create it will keep them. Let me know if that's giving you any problems. If you're asking because you're appending things to the file name (beats by dre etc) I would do that with a different program (not PS) at the end. There's probably a simple batch command line way of doing so.
    – TMobotron
    Aug 28, 2014 at 22:18
  1. Select the layer you want to save as jpeg/png, then in the layers panel Photoshop will auto highlight whatever layer is selected.
  2. Then go to the eye icon beside the selected layer in Layers panel; hold down your alt key and click on the eye.
  3. This will make only the layer you want to save as jpeg/png visible while hiding other layers.
  4. Now trim the extra background by going to Image>Trim.
  5. Save your current image by pressing Alt+Ctrl+Shift+S. It will save your image for web ie. in either png/jpeg format.
  • 2
    This doesn't really answer the question.
    – Scott
    Aug 28, 2014 at 6:52
  • Yeah..! It is not according to question but can be helpful if you want any single layer to convert into web format.
    – SuDzKooL
    Aug 28, 2014 at 6:55
  • Agreed, it's helpful.. but essentially unrelated to the question itself. Answers should actually attempt to answer the question being posed. :)
    – Scott
    Aug 28, 2014 at 6:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.