Using content aware padding
Using content aware padding

There are many cases where you need to adjust the background of your images.

Cloudinary offers the option to set the background of your images in many different ways.

Its possible to use the pad cropping option, together with the background parameter (b_ in URLs) to have the image background be changed to a specific color.

For example, if we change the background to green the image would look like:

It's also possible to assign an RGBA value to the background parameter :

If you want to match the image's background to its content you could let Cloudinary determine the background automatically by setting the background parameter to auto:

And if you want your image to be contrasted against the background, you could let Cloudinary choose the most contrasting color in the image, and use that as background by specifying auto:predominant_contrast for the background:

You could even make your background come alive by letting cloudinary choose the most contrasting color in the image and then use a gradient of that color as the background

Its also possible to add the gradient_fade effect with a value of symmetric_pad (e_gradient_fade:symmetric_pad in urls) to have the background fade into the image itself: