Skip to main content

Operations

A command is a name, a slash, and its arguments. Several commands separated by slashes run left to right.

resize/100x100/quality/70/format/webp

That resizes the image, sets JPEG quality to 70, then converts to WebP.

Transformations

CommandArguments
resizea geometry
cropa geometry with an offset
thumbnaila geometry
rotatedegrees
flipflophorizontal or vertical
legacy_thumbnail, legacy_cropa geometry

Adjustments

CommandArguments
brightnessbrightness and contrast
sharpenradius and sigma
grayscaletrue
sepiaa threshold from 0 to 1
inverttrue
autoleveltrue

Output

CommandArguments
formatjpg, png, gif, webp, tiff
quality1 to 100
striptrue or false

Special

CommandArguments
watermarkopacity, size, gravity

Geometry

Several commands take an ImageMagick geometry.

FormEffect
100x100fit inside 100 by 100, keeping the aspect ratio
100width 100, height follows
x100height 100, width follows
100x100!exactly 100 by 100, ignoring the aspect ratio
100x100>only if the image is larger
100x100<only if the image is smaller
50%half the size

A + in an offset sometimes arrives as a space, because some clients escape it as %20. crop converts a space back to a +.

Multi-frame sources

An animated GIF is returned unchanged by default, with every command skipped. Set DimsAnimatedImages to transform to run the commands over every frame.