Sub topic 8
Making Actions Work on Images of Any Size
Assume you can open, edit, and save images in Photoshop. You should also know the Layers panel, image-size commands, selections, and common adjustments. This chapter focuses on making one recorded action reliable across files with different pixel dimensions and orientations.
The working model
An action records commands, not your intention. If you record “move the logo to position 1450, 80,” Photoshop replays those same coordinates later. The logo may be correctly placed on one file but outside the canvas on a smaller file.
A portable action uses operations that adapt to the document. Prefer these approaches:
- Scale an image by a percentage instead of entering a fixed width.
- Use Image > Fit Image when every document must fit within maximum dimensions.
- Align layers with Photoshop’s alignment commands instead of dragging to a measured position.
- Use the layer’s bounds and canvas edges as references.
- Record separate actions for portrait and landscape images when the layouts truly differ.
- Keep important artwork in a named layer or Smart Object so later commands have a predictable target.
The action still depends on document context. A command that selects “Layer 2” can fail when another file has different layer names or a different layer order.
Build and test for variation
Before recording, define the limits your action must support. For example, decide whether the output needs to fit within 1600 × 1600 pixels, whether metadata should remain, and whether transparent backgrounds are allowed.
For resizing, use Image > Fit Image when both width and height have maximum values. Photoshop preserves proportions, so a wide image may reach the width limit while a tall image may reach the height limit. If you use Image Size, enable proportional scaling and avoid recording a fixed height unless every source has the same shape.
For placement, select the target layer and use the Move tool’s alignment controls. Aligning to the canvas is more reliable than recording a drag. If the action adds a watermark, place it in a predictable corner with canvas alignment and consistent margins.
Test with files that expose assumptions:
- A small and a large image.
- A portrait and a landscape image.
- An image with one layer and one with many layers.
- An RGB file and a file in another color mode.
- A file with transparency and one without it.
| Recorded choice | Common result on varied files | More portable choice |
|---|---|---|
| Fixed pixel resize | Unexpected output dimensions | Fit Image or proportional percentage |
| Dragged layer position | Different margins | Align to canvas |
| “Layer 2” target | Wrong layer or playback error | Named, prepared target layer |
| Fixed crop rectangle | Crops important content | A deliberate aspect-ratio workflow |
Common errors
A recorded crop can fail because the crop box was based on the first image’s dimensions. A fixed selection can also miss its target on a smaller document. Filters may produce different visual results at different resolutions, even when the recorded settings are identical.
Modal controls are another source of surprises. A modal control pauses playback and lets you change a value. This is useful when each image needs judgment, but it prevents a fully unattended batch. Turn on only the controls that require review.
If files do not share the required layer structure, prepare them first or add a stop that explains the required setup. Do not assume Photoshop can infer which layer you meant.
>callout note > Test an action on at least four deliberately different files before using it in a batch. A successful replay on the recording file proves very little.
Exercise
Exercise
You recorded an action that moves a watermark to 1450 pixels from the left edge. It fails on 1200-pixel-wide images. What should you change?
Show answer
Replace the fixed-position move with a canvas-based alignment command, or create a proportional layout that uses the document bounds. Then test the action on both portrait and landscape files.