imgix APIsRendering APIWatermarkWatermark Fit Mode

Watermark Fit Mode

mark-fit

Controls how the watermark image is fitted to its target dimensions.

Valid values are clip, crop, max, and scale. The default value is clip.

mark-fit=clip

Default. Resizes the image to fit within the width and height boundaries without cropping or scaling 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.

mark-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 scaling the image. Both the mark-w and mark-h parameters are required for this parameter.

mark-fit=max

Resizes the image to fit within the width and height boundaries without cropping or scaling 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.

mark-fit=scale

Scales the image to fit the constraining dimensions exactly.