Skip to main content
Participant
June 28, 2023
Question

How to automate format photos to white square box format for IG

  • June 28, 2023
  • 3 replies
  • 2434 views

SCRIPT / PROCESS HELP NEEDED

 

I want to create a automation process where all my files from either a folder or open can be automatically formatted to 1900x1900px white square. The photo files are different aspect ratios and the white edges would vary - Vertical shots vs. Horiztonal, 4x6, 4x5, 1x1, etc.

 

Any help would be appreciated. Thanks!

This topic has been closed for replies.

3 replies

Stephen Marsh
Community Expert
Community Expert
July 2, 2023

@RHCreative – So where are you at?

Participant
August 16, 2023

Hi @Stephen Marsh & @Sef McCullough 

 

Thanks for your patience – in busy season. Didn't mean to leave you hangning!

 

@Sef McCulloughThank you for creating the action! It worked on horizontal images but not verticals. Maybe I'm doing something wrong? P.S. - really enjoyed your retouching tutorial. You're a wizard!

 

@Stephen Marsh  – Thank you for providing this. How do I recreate the action off that screenshot? My experience of creating actions is limited. Any insight or direction appreciated!

 

Thanks again! 

Bojan Živković11378569
Community Expert
Community Expert
August 16, 2023

Here is example action based on action above that can do the job, it will keep open layered files as layered but with new dimensions and new canvas size https://drive.google.com/file/d/1emjq8qTTu6Ots0CsmyfhovM80tSiB3dh/view?usp=sharing

If anything goes wrong please report to fix.

Test action multiple times with multiple files and scenarios like layered with background layer, layered without background layer, PNG file without background layer but single layer and JPEG with single background layer. I have tested few time, more relying on my "experience" that everything should work fine.

Stephen Marsh
Community Expert
Community Expert
June 28, 2023

Create an action using fit image for 1900 px on both width and height. The action would also have a canvas size step to change size to 1900 x 1900 px with white background extension. Then batch the action.

Another method is a scripted approach similar to this action.

 

If you search the forum for the keyword square you should find many posts on the topic:

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/image-resize-script-worked-on-some-photos-but-not-others/td-p/11572554

Sef McCullough
Community Expert
Community Expert
June 28, 2023

Thanks, @Stephen Marsh 's solution is a little simpler, of course!

I wanted to test that, and found one step that's required to access the background color property in Canvas Size is that the image be flattened. One of those details that could drive someone insane trying to figure out.

I recorded it into a quick action. The forum won't accept .atn files though, so try this link.

Stephen Marsh
Community Expert
Community Expert
August 16, 2023

@Stephen Marsh What is point in conditional layered action if action flattens image at the end of layered action? Flatten at the beginning as @Sef McCullough did in his action or exclude flatten step. The only point would be to keep open file layered, at least thats my opinion.


quote

@Stephen Marsh What is point in conditional layered action if action flattens image at the end of layered action? 


By @Bojan Živković11378569

 

 

That step was not ticked/active, just a placeholder in case it was needed.

Sef McCullough
Community Expert
Community Expert
June 28, 2023

Hi @RHCreative ,

There are a few different ways you could approach this. Here's what I think would be the easiest:
Run File>Scripts>Image Processor on your files to save them out as jpegs. Turn on Resize to Fit at 1900x1900.
Output all images to a folder.
Now run File>Automate>Contact Sheet II with the settings below. This will load them all into individual square PS files with a white background.
You can then run Image Processor again to save out jpegs of these open images.
Let us know if that works for ya!
Sef