So I'm about to get into a part of my project where I have to process a ton of images. The processing flow is the same, so I would like to use a combination of Actions and Automation to do the job. I was able to build a script but I have one step in it that I can't get to work unless a source is also open and copied into memory. Let me explain:

I usually get a bunch of photos from an event, these photos need be processed and dropped into this template frame, in other words a layer with with graphics on the left and right sides but the middle has a placeholder for these photos. After loading the images, the flow that I have created is as follows:

  1. Convert image from background layer to a basic layer (transparent)
  2. Resize the canvas to accommodate for the 'frame' template
  3. Paste the 'frame' template
  4. Move the image layer on top of the 'frame' template
  5. Merge layers
  6. Save file as original name + serial.

The problem I'm having is with step three. In order for me to be able to take this step, the source of the 'paste,' the 'frame' layer needs to be in memory; aka I need to have that file open, then do a Ctrl+Copy, and now that it's in memory and my script could be applied on those loaded images.

What I want to be able to do is somehow permanently store this 'frame' layer inside this script or somehow so that I don't always have to have it open as a separate file and have it sit in memory after a Ctrl+Copy.

  • 2
    Is there any reason why you can't Place the frame instead of Pasting it?
    – Joonas
    Feb 7, 2018 at 7:31
  • What do you mean 'placing' it in terms of an action? Feb 7, 2018 at 15:34
  • Well you want to use Edit > Paste to bring in this image to the document. There’s also File > Place Embedded. This method takes a file from a path of your choosing and places it into the document.
    – Joonas
    Feb 7, 2018 at 16:53

1 Answer 1


No, atleast not if the template is nontrivial (also image files are usually HUGE, how would it help if you added a 1,000,000 lines to your code).

However, it seems like your missing a really simple approach. Use the script to load the template. Then you dont need to have it open, yhe script will open it and possibly close it after yove done. (Before you claim that this is slow id like to point out that the script needs to be read from disk too).

  • Having a script that loads the specific template and then copies its contents into memory is exactly what I needed, thank you! Feb 7, 2018 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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