imgix APIs
Rendering API
Blend Fit

Blend Fit

blend-fit

Controls how an overlay image is fit to its blend width (blend-w) and blend height (blend-h) dimensions.

Valid values are clamp, clip, crop, max, and scale. The default value is clip. Note: blend-fit is not applicable to color or text overlays—color overlays apply to the entire image, and text fit can be controlled with the txt-fit parameter.

blend-fit=clamp

Resizes the image to fit within the width and height boundaries without cropping or distorting the image. The remaining space is filled with extended pixels from the edge of the image. The resulting image will match the constraining dimensions. The pixel extension is called an affine clamp, hence the value name, clamp.

blend-fit=clip

Default. Resizes the image to fit within the width and height boundaries without cropping or distorting the image. The resulting image is assured to match one of the constraining dimensions, while the other dimension is altered to maintain the same aspect ratio of the input image.

blend-fit=crop

Resizes the image to fill the width and height boundaries and crops any excess image data. The resulting image will match the width and height constraints without distorting the image. See the blend-crop parameter for controlling how the blend image is cropped.

blend-fit=max

Resizes the image to fit within the width and height boundaries without cropping or distorting the image, but will not increase the size of the image if it is smaller than the output size. The resulting image will maintain the same aspect ratio of the input image.

blend-fit=scale

Scales the image to fit the constraining dimensions exactly. The resulting image will fill the dimensions, and will not maintain the aspect ratio of the input image.