CldImage Examples
Basic Transformations
Cloudinary supports a wide variety of powerful transformations that allow you to not only deliver, but easily edit and build new images on the fly.
Background Removal
Remove BackgroundremoveBackground
: Removes the background of the image using AI
background
: Specifies a color to use as a background.
underlay
: Specifies a public ID to use as an underlaying image.
Cropping & Resizing
Croppingcrop
: Specifies the mode to use when cropping an image based on the given dimensions.
Cloudinary additionally supports dynamic crop modes like thumb
that
may provide a different result based on the given width and height. To
help provide more options for controlling cropping images, you can specify
and object or array of objects.
For instance, to crop the original source image, which will then later resize it to the initial width and height, you can use:
Which will provide a consistent crop for all rendered sizes.
Learn more about cropping and responsive images.
Generative Fill
fillBackground
: Fills the background of an image using Generative AI
Generative Recolor
recolor
: Recolors an object in an image using Generative AI
Generative Remove
remove
: Removes an object in an image using Generative AI
Generative Replace
replace
: Replaces an object in an image using Generative AI
Generative Replace Background
replaceBackground
: Replaces the background of an image with an AI-generated background.
Filters & Effects
Included in the Cloudinary transformations library are different filters and effects that allow you to recolor, improve, fix, and artistically transform your images.
Blur
blur
: Applies a blurring filter to an asset.
Grayscale
grayscale
: Converts an image to grayscale (multiple shades of gray).
Opacity
opacity
: Controls the opacity level of an image.
Pixelate
pixelate
: Applies a pixelation effect.
Tint
tint
: Blends an image with one or more tint colors.
Chaining Multiple Effects
effects
: An array of objects the configure the effects to apply to an image.
More Filters & Effects
Learn about what other filters and effects are supported on CldImage Configuration.
Image Overlays
Image overlays allow you to place one or multiple images on top of another image.
Overlay Image by Public ID
overlays
: Any array of overlay objects
Overlay Image with Blend Mode
appliedEffects
: When configured on an overlay object, allows you to set an effect
that applies a blend mode, such as “multiply”
Image Underlays
Image underlays allow you to place one or multiple images behind a base image.
Replace Background with Image
underlay
: Public ID of image to use under base image
Replace Background with Multiple Images
underlays
: Array of underlay objects
Text Overlays
Text overlays allow you to place text on top of an image.
Adding Custom Text
overlays
: Uses overlay objects to add text on top of an image.
Adding Text with Effects
effects
: Applies effects to the overlaid text.
Misc
Video Thumbnail
assetType
: Specifies the type of asset to be delivered.
This is handy when wanting to create an image thumbnail from a video, where the asset type would be “video”, yet delivering an image.
More Examples
Find more examples on Social Card Templates.