Skip to content

Crop image

  • Type image.crop
  • Group MZBase
  • Role action
  • Risk reads only
  • Side effect none
  • Runs once per item
  • Needs media

Cuts an image to a box or an aspect ratio

Also available to AI agents and over MCP as a tool.

source

Source · string · required · default binary · one of binary, media

Where the input file comes from: the item’s file (binary), a media library item, or a URL.

binaryProperty

File field · string · optional · default data

Shown when source is binary.

mediaId

Media · string · optional

Shown when source is media.

mode

Mode · string · optional · default box · one of box, aspect

Crop to an aspect ratio (centred) or to an exact box.

x

X · integer · optional · default 0 · range 0 – …

Shown when mode is box.

y

Y · integer · optional · default 0 · range 0 – …

Shown when mode is box.

width

Width · integer · optional · range 1 – …

Shown when mode is box.

height

Height · integer · optional · range 1 – …

Shown when mode is box.

aspect

Aspect ratio · string · optional · default 1x1 · one of 9x16, 1x1, 16x9, 4x5, 4x3, 3x4

Aspect ratio, e.g. 1:1 or 9:16.

Shown when mode is aspect.

into

Into field · string · optional · default data

saveTo

Save to · string · optional · default none · one of none, media

Where the result goes: back on the item as a file, or into the media library (the item then gets mediaId).

mediaFolder

Media folder · string · optional

Shown when saveTo is media.

mediaTags

Media tags · array · optional

Shown when saveTo is media.

  • main

← All nodes