Custom shapes cropping
Custom shapes cropping
Filters and effects
Creative
Layers
Intermediate

You can crop an image based on any custom shape. Do this by having your own custom image as a mask for cropping, setting the overlay parameter as your mask image's public ID and setting the flags parameter to cutter (in URLs: l_<mask_image>,fl_cutter).

Here's the original image: Original

The following PNG image was uploaded to Cloudinary with the 'hexagon_sample' public ID: Original

Now, you can use this image with the cutter flag. For example, when applying it to an image with the 'pasta' public ID: Custom shaped

You can also add the relative flag to automatically adjust the dimensions of the mask to match the resulting image you need. For example: Adjustable size

The mask image can also be a semi-transparent PNG file to make the edges smoother. Here's an example of an uploaded mask: Semi-transparent mask

And here's a sample result while creating a 200x220 face detection based thumbnail of an uploaded image: Semi-transparency