Skip to main content
Participating Frequently
March 6, 2017
Question

Replacing smart object content as a batch process

  • March 6, 2017
  • 2 replies
  • 4728 views

Hi There,

I'm hoping to find some help creating a script/action that will fire a load of images from a specific file and replace the smart object in a psd template, saving as a separate jpg each time. Essentially like a batch process that saves me from going in and out of the folder using the Layer>SmartObject>Replace Contents pathway.

Is this possible? Any help would be greatly appreciated!

Thanks,

Rik

This topic has been closed for replies.

2 replies

c.pfaffenbichler
Community Expert
Community Expert
March 6, 2017

You may wan to search the Scripting Forum or start a thread there.

Photoshop Scripting

Batch replace smart objects

Participating Frequently
March 6, 2017

Thanks c. Pfaffenbichler!

I'll float the question over there as well. Unfortunately I don't have much scripting experience

Rik

Chuck Uebele
Community Expert
Community Expert
March 6, 2017

So what exactly are the steps you want to take? Do you have a folder of images that you want to replace in the templates smart objects? if so, does it matter which goes where, or are the files in the folder in order that you want them replaced in the smart objects? Are the files the same size and orientation as the smart objects. Are the smart object layers nested in groups? I most likely would be possible to do with a script.

Participating Frequently
March 6, 2017

Hey Chuck,

Thanks for the reply!

Yeah, basically I have a load of t shirt designs to go through. I've set up a psd template with the jumper as the background layer (psd is here if needed Template - Google Drive​ ) , then a smart object layer sized and positioned in the right place. So i essentially need a script that will look in the folder containing all my designs, grab them one by one, replace the smart object contents with each design, and save out each time as a jpg.

I essentially need a batch process which goes through my folder of designs, replaced the smart object content with each image in that folder.

Hope this makes sense! Thanks again for getting back to me!

Rik

Stephen Marsh
Community Expert
Community Expert
March 7, 2017

Just floating the possibility... If you don't need to use smart objects and there is a set maximum pixel width for the designs, then this could be done via variables (data driven graphics) using pixel replacement layers in a two pass workflow (first step to batch create the merges, secondly to resize/position the layer content and save out the final files). Although not an ideal workflow, it would likely result in the job being finished way before custom scripts were written.

EDIT: One such example here – Re: Data-driven grahics​ and you should not have to worry about using the resize script as the pixel replacement layer has resize options.