Hear from Slack, the ACLU, TED, & more at our customer summit in San Francisco Register
LOG IN SIGN UP
Documentation

Fit Mode

Features

Description

The fit parameter controls how the image will be constrained within the provided size *(width height)* values.

API Pattern

fit={value}

Parameter

Parameter Description
fit How the image will be constrained within the provided size values.

Parameter Values

Value Description
bounds Constrain the image size to fit within the specified size values.
crop Crop the image to the specified size values.

Notes

The fit parameter requires both the width and the height parameter to take effect.

Examples

Description HTML Demo
Fit to Bounds - Fit within the bounds of 150px in width by 150px in height. <img src="image.jpg?width=150&height=150&fit=bounds"/> Example
Fit By Cropping - Crop the image to 150px in width by 150px in height. <img src="image.jpg?width=150&height=150&fit=crop"/> Example