resiz[ly]A PictureEditor.com tool

Naming

Renaming is half of a bulk job and almost nobody offers it. Two hundred correctly resized files called image (1).jpg through image (200).jpg are not a finished job, so the filename is a field of the rule rather than something that happens to the output afterwards.

The tokens

A template is ordinary text with tokens in it. The default is {name}-{w}.{ext}. Anything that is not a token is written out as you typed it, including a token you spelled wrong — the plan warns you rather than guessing.

TokenWhat it isExample
{name}The source's filename with its extension taken off.DSC_0041
{ext}The output's extension. Never the source's, unless the rule kept the format.webp
{w}The output's width in pixels, after the fit and the pixel ratio.1280
{h}The output's height in pixels.854
{dpr}The rule's pixel ratio, as a bare number.2
{index}The source's position in the queue, zero-padded to the total.004
{parent}The immediate parent folder, or empty for a loose file.spring-2026
{rule}The rule's own name, lower-cased and hyphenated.grid-tile

Worked filenames

One source, spring-2026/DSC_0041.CR2.jpg, 4000 pixels wide, fourth in a queue of two hundred, matched by a rule called Grid tile that writes WebP at a maximum width of 640 with a 2x variant.

{name}-{w}.{ext}              DSC_0041.CR2-1280.webp
  {name}@{dpr}x.{ext}           DSC_0041.CR2@2x.webp
  {index}-{name}-{w}.{ext}      004-DSC_0041.CR2-1280.webp
  {parent}/{name}-{w}.{ext}     spring-2026/DSC_0041.CR2-1280.webp
  {rule}/{name}.{ext}           grid-tile/DSC_0041.CR2.webp
  {name}-{w}x{h}.{ext}          DSC_0041.CR2-1280x854.webp

Note what {name} keeps: everything before the last dot, so a file called DSC_0041.CR2.jpg keeps the .CR2 that its converter left behind. That is deliberate. It is part of the name someone chose, and quietly removing it would make two different sources collide.

When two outputs want the same name

This is detected in the plan and never at write time, which is the whole reason the plan exists. Two hundred files across four sub-folders, each with its own DSC_0001.jpg, is not an unusual folder — it is what a camera produces — and a template of {name}-{w}.{ext} turns it into one output that three other files quietly overwrote.

Three policies, chosen once for the whole run:

PolicyWhat it does
Add a numberThe second file becomes photo-2.webp, the third photo-3.webp. Nothing is lost, and nothing is where you expected it either.
Later file winsThe earlier row is struck through in the plan and never written. Useful when the duplicate really is a duplicate.
Stop and tell meNothing runs. The plan lists the pairs and the button stays disabled until the template or the policy changes.

Detection is case-insensitive. A ZIP can hold Photo.jpg and photo.jpg side by side; Windows and macOS cannot unpack both, and whichever was written last is the one that survives. That is a collision wherever the archive is going to be opened, so it is treated as one here.

What {parent} is for

It is the fix for the case above, and it is the only token that carries information the file itself does not have. {parent}/{name}-{w}.{ext} keeps the folder structure that made the names unique in the first place; {parent}-{name}-{w}.{ext} flattens it into one folder while keeping the names apart. Which of those you want depends on what is going to read the archive.

  • A file dropped loose, rather than inside a folder, has an empty {parent} and the token disappears.
  • Only the immediate parent is used, not the whole path. A three-deep tree does not become a three-part name.
  • Dropping a folder keeps its structure. Selecting files through the file picker often does not, because the browser hands over names without paths — use the folder picker or drag the folder itself.

A name this tool writes is not always the name you get

The archive holds exactly what the plan said. What happens after that is your operating system’s: Windows drops trailing dots and spaces, macOS may normalise accented characters into a different byte sequence, and some unzip tools shorten long paths. Names are trimmed and made safe here to reduce that, but a name that survives this tool can still be changed by whatever opens the ZIP.

Reference

Can a template put files into folders?

Yes. A literal slash in the template makes a folder inside the archive, so {rule}/{name}-{w}.{ext} writes one folder per rule. A slash that arrives inside a token value does not: a source called holiday/2019.jpg becomes holiday-2019, because that separator came from a filename rather than from you.

What does {index} count?

The source's position in the queue, counting from one, zero-padded to the width of the total. Two hundred files pad to three digits, so 001 through 200 sort correctly in a folder listing. It counts sources, not outputs, so all three outputs of the fourth photo carry 004.

Why did my filename lose a character?

Anything a desktop operating system refuses is replaced with a hyphen: the two slashes, a colon, a question mark, an asterisk, a pipe, the angle brackets and a double quote. Invisible direction characters are removed outright, because a name that displays as one thing and unzips as another is a trick rather than a name. Accents, CJK and emoji are left alone. Every substitution is shown in the plan.

What is the longest a name can be?

Each segment is trimmed to 120 characters. A path can hold several segments, so the whole path can be longer, but a single name longer than that is trimmed rather than rejected and the plan shows the trimmed version.

Back to the pipeline, or the responsive set if the job is a width list.