Image & Video APIs

Create image collages

Last updated: Aug-25-2025

Overview

Important
The Image Collage feature using the create_collage method will be deprecated as of September 16, 2025, and will no longer function after that date. Be sure to remove it from any production code.

You can continue creating collages using overlays.

Image collages are composed of several different images, combined together in a specific layout.

You can programmatically create image collages by combining assets that you've already uploaded to your Cloudinary storage. You can specify spacing and colors, and you can choose the composition of the overall collage.

This collage is composed of four images in one row, with black spacing between each:

Fashion collage

Note
Any images that you want to use in the collage must be publicly accessible.

Create collages using overlays

Another way to create collages with Cloudinary is to use overlays.

By specifying the positions of the images to be adjacent to one another, rather than overlaying the images on top of each other, you can create collages on the fly.

Here's an example of four images of an apartment combined as a collage using overlays:

Apartment collage


  • The base image is the one in the top left (docs/dining-apartment).
    Base image of the apartment collage
  • The kitchen image is applied to the right of it using the width of the initial image as the x offset ($w_iw/l_docs:kitchen-apartment/fl_layer_apply,x_$w)
    • $w_iw sets the $w variable to the initial width of the base image.
    • fl_layer_apply,x_$w positions the image to the right of the base image.
      Top two images of the apartment collage
  • The study image is positioned below the kitchen image, by using east gravity and the height of the base image as the y offset ($h_ih/l_docs:study-apartment/fl_layer_apply,g_east,y_$h)
    • $h_ih sets the $h variable to the initial height of the base image.
    • fl_layer_apply,g_east,y_$h positions the image below the kitchen image.
      Three images of the apartment collage
  • The lounge image is positioned using south_west gravity to fill the bottom left corner.
    Apartment collage

You can also set specific dimensions for each of the images, and use different x and y offsets with a background color to space out the images.

For example, in the following collage:

  • Each of the images are cropped to a 250 x 250 pixel square, using c_auto,g_auto to focus on the most interesting part of each image
  • 30 pixels are added to the x and y offsets to space out the images (fl_layer_apply,x_$w_add_30)
  • The background color is set to burlywood
  • The whole collage is padded using the limit padding mode to form a border around it.

Apartment collage

✔️ Feedback sent!

Rate this page: