Merge Photoshop groups each into their own single png


I am looking for a script/way to automatically render all Ps groups in a project into their own single .png file (so one .png per Ps group).

I have found scripts that export all layers as .png but that's not useful. Also having to go in and select the layer groups that I want is a bit annoying because I will always want one PNG of every group.

Anyone that can help?

ps: I have a script that exports all layers into a .png, so having a script that automatically merges groups into one layer would do aswel!

Thank you!

8/23/2016 3:24:00 PM

Photoshop’s Generator can do this. There’s two steps needed.

  1. Rename your groups to include .png as a suffix.
  2. Turn on File → Generate → Image Assets.

Here’s a file I have set up to generate PNGs based on groups. Note that bitmap masks or vector masks on the groups can be used to control the exported image size and cropping.

Generator in Photoshop, used in the Bjango app icon templates

Turning on File → Generate → Image Assets creates a folder next to your PSD with all the assets.

Generated files in the Finder

Here’s some example documents with Generator set up for exporting, if you’d like to see it in action. Generator can do even more, using additional info in the layer or group name (for image size, exporting multiple formats etc).

3/22/2017 11:10:00 PM