Skip to main content
Skip table of contents

Masks

Masks can be applied to a layer by specifying a mask command value. Mask should be an image source, and can be either an image or a group.

The mask image is applied to the current layer only; the layer behind the current layer remain unaffected.

For example:

https://fx.images.drivecommerce.com/api/v1/drive/image/?layer&src=dog&mask=coffee

image-20241130-022834.png

As evident from this example, some issues may arise if mask dimensions do not match canvas or image dimensions. For best results, it is recommended to prepare mask and overlay images so their dimensions match the intended canvas dimensions.

Mask and overlay images are always aligned to the top-left canvas corner.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.