Resize, crop and convert from the URL

Each URL names an operation, its size and a list of options. The picture is rendered on the first request and served from cache after that.

Four operations

The operation comes first in the path and decides how the picture is sized.

OperationIn the URLWhat it does
cover/cover/600x400/Resize and crop to the exact size.
width/width/800/Resize to a width. The height follows the aspect ratio.
height/height/600/Resize to a height. The width follows the aspect ratio.
cdn/cdn/No resize. Rotate from EXIF, compress and serve.

Pick what to keep

Add a mode after cover to choose the crop. Without one, cover uses smart.

https://img.imagefoundry.io/acme/cover:attention/600x400/products/shoe.jpg

A 600 by 400 crop around the most interesting part of the picture.

Crop modes

Smart crop and face crop are on the Pro and Scale plans.

smart, attention

Keeps the most striking region, judged by luminance and saturation.

entropy

Keeps the region with the most detail.

face

Keeps the detected faces in frame. Falls back to attention when there are none.

contain, inside

Fit inside the box. contain pads to the full size with fill-color, inside does not pad.

north … center

The compass points: north, northeast, east, southeast, south, southwest, west, northwest and center.

fp-x, fp-y, fp-z

A focal point from 0 to 1 on each axis, with an optional zoom from 1 to 100.

The right format for each browser

format:auto reads the Accept header and sends AVIF, then WebP, then the original format. Responses carry Vary: Accept so the CDN keeps one copy per format.

https://img.imagefoundry.io/acme/width/800/format:auto,quality:70/products/shoe.jpg

AVIF to browsers that take it, WebP to the rest, JPEG otherwise.

Format and quality

OptionValuesNotes
formatauto, jpg, png, webp, avif, tiff, gifOutput format. Without it, the original format is kept.
quality1–100Defaults to 80.
losslesstrueLossless WebP and AVIF.
progressivetrue, falseProgressive JPEG and PNG. On by default.
chromasub420, 422, 444JPEG chroma subsampling. 444 is the sharpest.
colorquant2–256Reduce a PNG to this many colours.
dpr1–8Multiply the output size for high-density screens.

Watermarks and text

Place a logo from the same source, or set text in one of the bundled fonts. Both can be positioned, scaled and faded.

# Logo in the bottom-right corner at 80% opacity
https://img.imagefoundry.io/acme/width/800/
  wmk-path:%2Flogo.png,wmk-position:southeast,wmk-pad:15,wmk-opacity:80/
  products/shoe.jpg
​
# Text along the bottom with a soft shadow
https://img.imagefoundry.io/acme/width/800/
  txt:Free%20shipping,txt-size:48,txt-color:ffffff,txt-position:south,txt-shad:2/
  products/shoe.jpg

Overlay options

wmk-*

wmk-path, wmk-position, wmk-scale (1–100), wmk-opacity (1–100), wmk-rotate (0–359), wmk-tile, and a minimum base size with wmk-min-w and wmk-min-h.

txt-*

txt, txt-font, txt-size, txt-color, txt-position, txt-pad, txt-shad (0–10), txt-width, txt-lead, txt-track and txt-clip.

blend-img

Blend a second picture over the first with blend-mode and blend-alpha (0–100).

More options

TaskOptions
Cut a region out firstextract-top, extract-left, extract-width, extract-height
Pad the picturepad, pad-top, pad-right, pad-bottom, pad-left, fill-color
Round corners or maskcorner-radius, mask:ellipse, mask-bg
Rotate and fliprotate (0–359), flip (h, v, hv), autorotate:false
Trim plain edgestrim, trim-tol (0–100), trim-color, trim-pad
Never upscalewithoutEnlargement:true
Render one PDF pagepage:3
Flatten an animationanimation:false
Keep EXIF datakeep-metadata:true

Try it on one picture.

Free for 1,000 transformations a month. No card needed to start.