Bulk Image Resize — Aspect Ratio Lock for SNS Exports
A folder of product photos goes through a “resize all to 1080×1080” macro. Half the shots were 4:5 portraits. The macro stretched them to squares. On Instagram they look like funhouse mirrors; on the store grid the labels warp. Bulk resize is only safe when aspect ratio lock is part of the recipe — not an optional checkbox you forget under deadline.
Define the job before you click Run
Ask four questions:
- What target ratio does this placement need (1:1, 4:5, 16:9, …)?
- Do we crop (cover) or fit with bars (contain) when sources differ?
- What is the max edge in pixels (for example longest side 2048)?
- What format and quality comes after resize?
If sources mix ratios and the network demands a strict frame, you need a crop policy or a rejection rule — not silent stretch. Write that policy where marketing ops can find it.
Max-edge resizing (catalog-friendly)
For archives and CDN masters, a common pattern is:
- Lock aspect ratio
- Set longest side to N (for example 2000px)
- Leave the short side computed
- Then encode WebP or JPEG
That preserves geometry for every photo while capping weight. You are not forcing a square; you are capping resolution. Storefront tiles that need 1:1 should come from a separate crop pipeline, not from unlocking aspect “just this once.”
Platform export map (verify yearly)
| Placement | Typical ratio | Notes |
|---|---|---|
| IG feed | 1:1 or 4:5 | 4:5 uses more mobile screen |
| Stories / Reels cover | 9:16 | Leave safe margins for UI chrome |
| X / LinkedIn link card | ~1.91:1 | Near OG landscape |
| Marketplace tile | Often 1:1 | Crop with focal lock |
Build one master per ratio when brand allows; batch-scale within that ratio for each channel’s pixel cap. Platform pixel recommendations change — treat the table as a starting checklist, not eternal law.
A bulk pipeline that does not destroy files
- Work on copies; never overwrite camera originals.
- Normalize orientation (EXIF rotate) before measuring dimensions.
- Filter outliers (panoramas, extreme crops) into a “needs manual crop” folder.
- Resize with aspect lock to max edge or target box mode.
- Compress with a quality cap; spot-check text-heavy SKUs at 100% zoom.
- Name outputs with size and ratio (
sku_4x5_1080w.webp) so nobody reuploads the wrong set.
Use image-resize for ad-hoc batches and one-off fixes when a full desktop script is overkill — same rule: lock ratio, then set the constraining dimension.
Stretch is not a shortcut
Non-uniform scale shows up immediately on packaging, tires, logos, and faces. If a square is mandatory and the photo is not square, crop with a human- or face-aware focal point. Automating stretch teaches the brand that “good enough” is warped — and warped assets get screenshotted in competitor decks.
Quality control sampling
After a 500-image run, review:
- Ten random SKUs at full resolution
- All images containing small typography
- Dark shots (compression banding)
- Any file that changed aspect versus source (should be zero if lock worked)
Automate dimension asserts in CI if you publish to a storefront: width/height within epsilon of the expected ratio. Fail the pipeline when unlock sneaks back into a script flag.
Talking to marketing ops
Write the rule on the shared drive: “We never unlock aspect for social exports. We crop or letterbox on purpose.” Bulk tools make mistakes at scale — a locked default is cheaper than reshooting a catalog because a checkbox flipped during a late-night export.
Batch work rewards boring consistency: lock ratio, resize, then compress, name clearly, and sample the output before the scheduled posts fire.