The day I realized I had spent eight hours cropping and resizing the same 200 product images, manually, one at a time, I did not feel like a professional. I felt like a very expensive copy machine. That was about twelve years into my career, and the embarrassment of it pushed me to actually learn Photoshop scripting over a single obsessive weekend. I have not done that kind of repetitive work by hand since.

If you are already building Photoshop actions and using presets, you are ahead of most people. But there is a ceiling to what the Actions panel alone can do, and once you understand what is happening under the hood, you will see exactly where that ceiling is and how to break through it.

Why Photoshop Actions Hit a Wall (and What Scripting Does About It)

A Photoshop action is a recorded sequence of steps. It runs the same way every time, regardless of what is in front of it. That is its strength and its fundamental limitation. It cannot make decisions. It cannot look at a file and say “this image is already 2000 pixels wide, skip the resize step.” It just executes.

Photoshop’s scripting engine, which runs JavaScript-flavored JSX files, gives you conditional logic. You can write a script that checks image dimensions before resizing, reads filename metadata to route files into different export folders, or loops through an entire directory without the Batch dialog’s quirks getting in the way. The script is not replacing your action, it is wrapping it in a brain.

The two work best together. You keep your carefully tuned action doing the visual heavy lifting, and the script handles the decision-making and file management around it.

The Anatomy of a Script That Actually Saves Time

Here is a stripped-down version of the pattern I use for e-commerce clients. The script opens every JPG in a source folder, runs a named action called “Product Master Clean” (which does my sharpening, color grade, and shadow cleanup), then exports two versions: a 2000x2000 pixel file for the product detail page and a 800x800 pixel file for thumbnails, both saved as JPEGs at quality 10 out of 12 in Photoshop’s save dialog.

var folder = Folder.selectDialog("Choose source folder");
var files = folder.getFiles("*.jpg");

for (var i = 0; i < files.length; i++) {
  var doc = app.open(files[i]);
  app.doAction("Product Master Clean", "My Actions");
  exportResized(doc, 2000, "/export/full/");
  exportResized(doc, 800, "/export/thumb/");
  doc.close(SaveOptions.DONOTSAVECHANGES);
}

The exportResized function handles the resize and JPEG save. The whole thing runs unattended. I set it going, make coffee, and come back to a folder of finished files. At quality 10 on a 2000x2000 image you are typically landing around 1.2 to 1.8 MB per file, which balances retouching detail with sane upload sizes for most e-commerce platforms.

The action “Product Master Clean” took me two hours to build and tune. The script took about ninety minutes over that same embarrassing weekend. Together they have now processed somewhere north of 40,000 product images.

Building the Action That the Script Will Call

The action is where your craft lives. The script is just logistics. Do not shortcut the action because you think the script will compensate. It will not.

For product work, my “Product Master Clean” action runs in this sequence: convert to sRGB if not already, run a Curves adjustment layer locked to a specific preset (saved as “Studio Neutral v3” in my presets panel), apply Unsharp Mask at Amount 85, Radius 1.2, Threshold 3, flatten, then trim transparent pixels. That trim step is important and people skip it. If your source images have inconsistent canvas sizes from a shooting tether, the trim normalizes them before the script resizes, otherwise your 2000-pixel output is measuring canvas, not subject.

Record the action, then go back and time it manually on five different files before you trust it to a batch run. I have a column in my tracking spreadsheet for “action QA passes” and I require at least three before anything goes to a client job.

One Job That Made the Case Better Than I Ever Could

A mid-sized Chicago ad agency brought me in two years ago to handle post-production on a product catalog shoot. Five hundred SKUs, two angles each, so 1,000 images total. The creative director needed web-ready files by end of business the same day the shoot wrapped.

I ran the full batch script while I handled the handful of hero shots that needed individual attention in a separate Photoshop session. By 3:30 PM, all 1,000 automated files were done and sitting in a shared Dropbox folder, organized by SKU number because the script pulled that from the filename. The agency’s internal retoucher had budgeted three days for the same work. I am not saying this to brag, because the script did the work. I am saying it because that moment is what I point to when someone asks whether learning JSX is worth the time investment.

Where to Go Next Without Getting Lost in Stack Overflow

If you are comfortable with Photoshop actions and want to add scripting, start with Photoshop’s own scripting guide, available free from Adobe as a PDF titled “Adobe Photoshop Scripting Guide.” It is dense but accurate. Peter Kahrel’s resources on InDesign and Photoshop scripting are also worth bookmarking. Beyond those, the ExtendScript Toolkit, now replaced by Adobe’s UXP platform for newer features, still runs fine for this kind of batch automation in current Photoshop versions.

Keep your first script small. Pick one repetitive task you do weekly, automate just that, and let it run for a month before you expand it. Complexity is not the goal. Reliability is.

The single most valuable thing scripting gave me was not speed, it was consistency. Every file processed the same way, every time, with no 3 AM decision fatigue degrading the output. That is what you are actually buying when you invest the weekend.