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. Use mark-fit[N] to style a specific additional watermark layer — styles do not inherit across watermark layers.
clip — fits inside the box, aspect kept
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.
Try it on your own images
Open the sandbox in your imgix dashboard to build a URL against one of your own sources and watch mark-fit change the output as you type.