Photoshop image macro (or something even better!)

I spend a lot of time in Photoshop for someone in BI. Between cleaning up images, building logos for my latest project, or producing material for user groups, I probably use it at least once a week. Through it all, I usually need to produce variants, in different file formats and sizes. So it can quickly become a dozen uses of the Save As… or Save for Web functions.

I hate manual work, so you can see why it was frustrating in the extreme. Then I realised how silly I was being by not having already googled for it!

It took a while because my keyword searches weren’t the terms Photoshop use but I found the Secret Sauce. And if you’re the sort of person who’d type “photoshop image macro” – here’s how you do it!

The trick is the option File > Generate > Image Assets.

Once this is ticked, you can then do one of two things:

  1. Rename a layer to use a file extension (and the other available syntax) so for instance going from “MyLayer” to “MyLayer.png”

  2. Creating a Group (the folder icon at the bottom of the Layers pane) for your layers and using the renaming trick there

Doing a single layer will produce an image with the layers contents in whatever file name you specified into a folder in the same place as your Photoshop file. The Group version also produces an image but for all the layers contained within it.

The Photoshop help article on generating image assets is pretty good and they have a followup containing more tips and tricks for the syntax

I thought I’d give you an example I was working on in the weekend. I had to produce a logo for the R user group I’m setting up.

I knew that the logo had to go up on meetup.com and that the image renderer could be funny so I didn’t know whether a png, gif, or jpeg would work best.

The easy solution was to enable the asset functionality and rename the logo group “CaRdiff.jpg,CaRdiff.png,CaRdiff.gif” so that it would generate all three. I also put a white background layer inside the group to make sure Meetup wouldn’t do something crazy when it was resizing the image.

[Autogenerating photoshop images][1]
The bits needed for generating images in Photoshop

Conclusion

The option File > Generate > Image Assets is a real time-saver for me and clear evidence of why you shouldn’t just grin and bear manual labour. OK it can take a while to find the right solution, but boy does it feel good when a task you really dislike is removed.

Search