There’s a specific kind of misery that comes from doing the same crop 200 times in a single afternoon. I know this because I lived it, about fifteen years ago, sitting in a commercial studio in Chicago resizing product images one by one because nobody had set up a proper batch system. By image 140-something I started doing the mental math: at roughly 90 seconds per image, I was burning through time that could have been spent on literally anything else. I learned to write my first Photoshop script the following week. I have not manually repeated a task like that since.

This is what automation actually is: not laziness, but the decision to spend your cognitive budget on work that requires a human brain.

What Scripts Do That Actions Can’t

Most photographers stop at Photoshop Actions, which is a reasonable place to start. Actions record and replay a sequence of steps. They’re fast to build and handle the majority of repetitive tasks well. But they have a ceiling. Actions don’t make decisions. They can’t look at a file and say “this one is 300 DPI, skip the upsample step” or “this filename contains the word FINAL, route it to the approved folder.” Scripts can.

Photoshop supports JavaScript, AppleScript, and VBScript for automation. JavaScript is the most portable across Mac and Windows, so that’s what I work in. A script operates through Photoshop’s DOM (Document Object Model), which means it can read and manipulate virtually every property of a document and its layers programmatically. You’re not clicking through menus. You’re talking directly to the application.

The practical difference shows up immediately. An action might resize an image to 2000px on the long edge. A script can read the incoming file dimensions, decide which edge is longest, calculate the correct ratio, apply the resize, check if the result meets a minimum file size threshold, and then either export or flag the file for review. That’s not four actions stacked together. That’s conditional logic, and it changes what’s possible.

Building a Real Batch System: The Specifics

Here’s a workflow I built for an e-commerce client running roughly 300 SKUs per shoot cycle. Their final deliverables were three sizes: 2000x2000px for their product pages, 800x800px for thumbnails, and a 1200x628px crop for paid social. All JPEGs, all sRGB, quality setting 10 in Photoshop’s Save for Web dialog (which equates to roughly 80% quality, keeping file sizes under 300KB without visible compression artifacts at screen resolution).

The script I wrote does the following in sequence: opens each raw-processed TIFF from a watched folder, checks that the canvas is square (and if not, adds white fill to the shorter dimension to force a square without distorting product), applies a sharpening routine tuned for screen output (Unsharp Mask at 85%, 0.6px radius, 0 threshold), exports the three sizes to three subfolders, logs the filename and export timestamp to a text file, then closes without saving the original. The whole process runs unattended. Three hundred files take about 22 minutes.

Before this system, their retouching team was doing that export sequence manually, which ran closer to four hours with the folder organization included. That’s not a 10% improvement. That’s a workflow that changed how they staff a shoot day.

Where Automation Actually Breaks Down

I want to be honest here because most automation content oversells this stuff. Scripts fail in predictable ways, and knowing them ahead of time saves real pain.

The biggest failure point is file inconsistency. A script written for TIFFs will choke on a layered PSD if you haven’t accounted for flattening. A batch that assumes sRGB source files will produce color-shifted output when someone drops in a ProPhoto RGB file from a different camera profile. I now build explicit file checks at the top of every script, reading the color profile and document mode before doing anything else, and routing anything unexpected into a “needs review” folder rather than letting the script attempt to process it and produce bad output silently.

The second failure point is version drift. Adobe updates Photoshop, something in the scripting API shifts, and a method that worked for two years suddenly throws an error. I keep a version-locked copy of every critical script alongside the current one, labeled with the Photoshop version it was tested on. It sounds excessive until it saves a client deliverable on a deadline.

The Spreadsheet I’m Slightly Embarrassed About

I track my time savings from automation in a spreadsheet. I have been doing this since 2012. The current total is just over 2,400 hours, which I am aware is a strange thing to maintain. But it disciplines how I think about building new scripts. If I spend eight hours writing and testing a new workflow, I want to know how many runs it takes to break even. For a batch that saves 45 minutes per use, I break even after about 11 runs. Most of my production scripts hit that inside the first month.

This is also how I evaluate automation tools honestly. A Photoshop action set that costs $49 and saves me 20 minutes per project pays for itself after roughly two and a half uses. That’s an easy yes. A plugin at $299 that saves 5 minutes on a task I do twice a month takes two years to earn its keep. The math isn’t complicated, but most people don’t run it.

Setting Up Your First Script-Based Batch

If you’re building toward this for the first time, start with Photoshop’s built-in Script Events Manager (found under File > Scripts > Script Events Manager). It lets you attach a script to a specific application event, like “when a file is opened” or “when a document is saved.” This is the simplest form of event-driven automation and doesn’t require you to write a full batch loop from scratch.

From there, the ExtendScript Toolkit (or the newer UXP developer tools depending on your Photoshop version) gives you an environment for writing, testing, and debugging scripts with real error feedback. Adobe’s Scripting Guide is dense but accurate. It’s the actual reference document, and reading even the first 30 pages will reorient how you see every task you currently do by hand.

The single most valuable thing you can automate is the task you do most often and resent the most. Start there, build something small that works, and the instinct for where to go next will follow naturally.