Sign up ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

I have a frame in which different photos must shrink and fit into (frame size is absolute), and then save into different file names (preferably same name as the file that was fit into the frame). There are a total of 1400 images (with more coming in the future), so its hard to do with hand.

I tried data sets and variables. But that only lets me fit one image into the frame each time (with layer pixel replacement) . As the replacement pixel will only take a file, not iterate through a folder. Also i couldn't find a way to automate this process with actions.

So is there a way to have Photoshop iterate through the files of a folder. Fit them into the frame, then save them with the same name?

share|improve this question
Have you tried the File > Automate > Scripts > Image processor ? If you check Resize to fit it will keep the aspect ratio. You could add Action that makes sure that each document has identical width and height with canvas size and then make the document big enough to fit in your frame by using canvas size, place frame above the background and that should do it. –  Joonas Mar 26 '13 at 12:55

3 Answers 3

up vote 0 down vote accepted

You could create an action that resizes the images, then imports your frame onto the top layer and saves out the file.

Then simply create a batch render for the folder that contains your images.

Look for tutorials in creating actions and batch rendering in Photoshop.

share|improve this answer

The tool in photoshop you need is called Batch Processing (file > automate > batch).

You'll first need to create an action, then apply that action to the directory where your images are.

Check out:

share|improve this answer

I finally found a solution to this after searching and searching with nothing that worked!!!

I always ran into the problem where part of an image would be cropped off if I set up the script to resize off of a horizontal value for example.

Anyway. my solution was this. I created a script that first used the image-trim and only set it to trim to the top and bottom. Then I edit-cut the image and set background color to white (if your images are already on white). Then I resized the canvas to 30" x 30" square which is much larger than any image we will ever have. Then I pasted in place, and pasted in place a second time (this is the key). Then rotate this second (top) image 90º, then set transparency to 50%, and again choose image-trim, but this time set it to trim to all sides. You now have a trimmed image to square, no matter what the original crop orientation!

Also make sure if you have any PSD layered images mixed in to do a flatten image before anything else.

share|improve this answer
Can you show the script? –  Kurt Sep 8 at 19:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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