Can I create custom collage based on image sizes?

Options
Stefania
Stefania Member Posts: 4

If I do not know the image sizes, the height and width, can I create a collage that will assign each image a vertical/horizontal spot in the template based on their ratio or height/width? Is there a way to create a collage with images that do not have the same size but be fit in without cropping? The images are random and I do not know what the user will input

Best Answer

  • Tamara
    Tamara Member, Cloudinary Staff Posts: 100
    edited October 2023 Answer ✓
    Options

    Hi there,

    Certainly, you have two options for image uploads: "crop with fill" and "crop with pad." You can find detailed information in the documentation here.

    If you prefer not to crop the images, you can use the "crop with pad" option. This maintains the original width and height and simply adds padding around the images. Your collage will resemble something like this example (note the black padding): https://res.cloudinary.com/demo/image/upload/b_black,c_pad,h_250,w_250/docs/models.jpg

    If you have any more questions or need further assistance, please feel free to ask :)

Answers