Skip to main content
Participating Frequently
May 10, 2021
Answered

Running a Batch (Image Scripting) for Smart Objects

  • May 10, 2021
  • 4 replies
  • 9949 views

Hey guys I wanted to ask how to run a script in CS6 to process multiple images quickly into a Smart Object area, my designs are all Black and White and I'm only replacing a single Smart Object on a background image...I've seen a few Youtube videos explaining the process but I want to either create a simple script myself or find one that I could modify/copy...

My process would be:
Take 250+ images from a single folder (they can be PDFs or JPEGs...what would work better?)
Replace the original smart object with each image one by one.
Match the width, but not the height (some of the images are more square, some are rectangular etc.)

Save as a Jpeg into a new folder


Can anyone advise on this? 

 

Cheers,

 

Ben

 

Correct answer JJMack

I got the process to work so i'm able to batch the images onto the templates...the last thing, using the edits to keep the transformation rotation unfortunately doesn't work ("not safe to edit")

 

I think that's good though i can make the little adjustments needed but having all the images somewhat decent helps a ton

 

Thanks JJMack!


The message not safe to edit means you either have Illustrator vector smart objects or ACR Smart Objects in your Template.  Photoshop can not Edit these. They are edited in AI or ACR.  Therefor they are not compatible with my Photoshop script edit option my scripts can not control the editing Process. Control would be transfer to you in whatever application or plug-in processes vector files or Camera Raw files on your system. Please read the help this is clearly stated in the help.   Those types of smart objects can not be edited in Photoshop. So my script tell you these objects are not safe to edit. You can replace those object via replace content in scripts.  It is suggested that you use use PSB smart objects in templates that is converted  Photoshop layers to smart object layers  or to use Placed PSD files.  Avoid using placed Png and Jpeg files for png files that have transparent borders will be trimmed to the Png's Pixel subjects bounds and Jpeg file do not support transparency or layer which means my script edit processing has to merge all layer basically flatten the object and that will remove any transparency replacement image may have. Placed Raw and Vector  files Smart objects will be skipped if the edit option is used they will not be updated you get the message not safe to edit. Again please read the help.

4 replies

Stephen Marsh
Adobe Expert
May 22, 2021

@Benjamin5FC1 

 

Did one or more answers in this topic work for you? If so, please mark them as one or more correct answers.

 

Otherwise, where are you at with solving your workflow issue?

Stephen Marsh
Adobe Expert
May 12, 2021

 

One option is to use one of JJMack's collage scripts:

 

http://www.mouseprints.net/old/dpr/PhotoCollageToolkit.html

 

I'd probably start with a simple script, such as BatchOneImageCollage.jsx 

 

__________

 

Another option is just a "simple" action and batch or image processor or image processor pro worflow.

 

Recorded action steps would be similar to the following, working on a temporary copy of one of the 250 transparent graphic files:

 

1) Trim imge: transparent pixels

2) Fit image command to a targeted max. width and height

3) Canvas size command to resize to the size of the static background image

4) Place the static background image from it's fixed location on your drive

5) Use the relative keyboard shortcut cmd/ctrl [ or another method to move the static background image behind the transparent graphic layer

6) Adjust the X and Y position of the transparent graphic to the desired position

 

Then batch/image processor/image processor pro the action using the x250 graphics, the saved files will be using the filename of the transparent graphic and can have other text as a prefix or suffix.

 

Bojan Živković11378569
Adobe Expert
May 11, 2021

Hopefully you will solve your problem with @JJMack  script. For the feature just reminder that you can use Data driven graphics or variables to process lots of images and to automatically scale them down to pixel content on given layer. You can only export or save files as PSD but there is only one step to convert all files to any desired format.

Participating Frequently
May 11, 2021

Hi Bojan...i've tried this but i'm only able to change one picture at a time using the pixel replacement variable? what are the steps to do this with multiple images?

JJMack
Adobe Expert
May 11, 2021

Data driven graphics does not support smart object layers replacement.  Normal image layers and text layers can be changed other layer type only their visibility can be changed.

You should be able to change as many image layer as you like in a Data driven Template you can have many variable layers.   You can not use Smat object layer for image to be able add warping, add perspective distortion etc to the object contents.  

 

 

JJMack
Stephen Marsh
Adobe Expert
May 10, 2021

I'd recommend JPEG and avoid smart objects unless there is a good reason to use them. Does each of the 250 images already have a different smart object, or is it a common placeholder image? How will the 250 replacement images be matched to the 250 originals?

Participating Frequently
May 10, 2021

So what process would you use to replace an image in the same place every time? I've only seen it done using the Smart Object 

Stephen Marsh
Adobe Expert
May 10, 2021

Is it x1 template and x250 images?

 

Is it x250 images and x250 replacement images?

 

Sample files or cropped screenshots of the layers panel might help to Illustrate.