ResizlyResize photos

The recipe format

A recipe is a rule stack written to a file: name.resizly.json when it is exported from the recipe bar, and _resizly/recipe.json inside every archive a run writes. It contains rules only. It cannot contain a photo, a filename or a size of anything you processed.

An example

{
  "resizly": "recipe",
  "version": 1,
  "name": "Catalogue",
  "options": { "collisions": "suffix", "archive": "by-rule" },
  "rules": [
    {
      "label": "Listing",
      "enabled": true,
      "matcher": { "kind": "glob", "pattern": "**/*.jpg", "exclude": "**/raw/**" },
      "transform": { "target": "box", "width": 960, "height": 960, "longEdge": 1600,
                     "fit": "pad", "anchor": "centre", "pad": "white", "upscale": false },
      "dpr": 1,
      "format": "webp",
      "quality": 82,
      "maxKb": 150,
      "template": "{parent}/{name}-{w}.{ext}"
    }
  ]
}

Top level

Recipe keys
KeyMeaningRule the importer applies
resizlyalways "recipe"anything else is refused
versionthe format version; this build writes 1a newer version is read for what is understood and the rest is listed as dropped
namethe set's nameat most 60 characters
optionscollisions (suffix, overwrite, stop) and archive (flat, by-rule, by-group, mirror)unknown values refused
rulesthe ordered rule stack1 to 64 rules

A rule

Rule keys
KeyValuesBoundary
labelthe target's name1–80 characters
matcherkind (all, glob), pattern, orientation, exclude, formats, alpha, dim {side, min, max}, bytes {min, max}an unknown matcher kind is refused, never coerced
transform.targetmax-width, max-height, max-long-edge, max-short-edge, box, percent, physical, exactpixels 1–16,384
transform.percent1–400needed by percent
transform.physw, h, unit (cm, mm, in), dpineeded by physical
transform.fitcontain, cover, inside, pad
transform.focus / zoomfocal point as fractions; zoom 1–20cover only
transform.padwhite, black, transparent, edge or a six-digit hex colourpad only
dpr1, 2 or 3
format, qualitysource, jpeg, png, webp; quality 1–100PNG ignores quality
maxKb, minKbKB ceiling and floor, 1 KB = 1,024 bytesminKb must be below maxKb
dpi1–2400, written into JPEG and PNGWebP has no DPI field
mattewhite, black or a hex colour for JPEG transparency
resamplebrowser or lanczos3
firstMatchtrue stops lower rules from seeing a matched file
templatethe name, with tokens1–240 characters
group, safe, circleplatform label and preview-only overlaysnever change a pixel

What the importer refuses

  • A file over 256 KB, before it is read into memory.
  • More than 64 rules, a label over 80 characters or a template over 240.
  • Any number out of its range, and any matcher kind, target or format it does not know.

A refused file leaves the saved recipes exactly as they were, and the message names the key that failed. An accepted one is shown as a read-only summary first and runs nothing.

The manifest

With Write a manifest on, the archive also holds _resizly/manifest.csv and _resizly/manifest.json. The JSON lists every source's relative path, byte size and pixel size; every output's path, target, box, format, quality, crop, placement and real bytes; and every skipped file with its reason. Drop last run's manifest.json on the queue to see what is new, changed or gone since then.

The rule fields are explained in the rule reference, the tokens in naming, and saved recipes live on recipes.

Photographic visual for Recipe Format
Recipe Format
Choose photos