Skip to main content

Trim white space but force image to be square

Comments

5 comments

  • Aleksandar Kostadinov

    Hi Brian,

    May I please ask you to share a link to an example image/transformation that you tried? We'll then be able to take a look and suggest ways to achieve that.

    Best regards,

    Aleksandar

    0
  • Brian Kidd

    Here's a sample image.

    I'd like to have a square image where the graphic is as large as it can be.  In this example, the image is wider than the height so the height needs to be the same as the minimum width.  I've cropped the image - here's what I'd like to have in the end:

     

    Thanks again.

    0
  • Brian Kidd

    I'm trying to maximize the size of the image while keeping it square.

    0
  • Shirly Manor

    Hi Brian,

     

    You can first trim the image and then set the aspect ratio to 1:1 and add lpad if needed. For example:

    https://res.cloudinary.com/demo/image/upload/e_trim/c_lpad,ar_1/nice_bird.jpg

     

    If you want, you can upload the logo to your account and try using the `e_trim/c_lpad,ar_1`.

    Let me know if that works,

    2
  • Brian Kidd

    Thanks Shirly, this worked perfectly!

    0

Post is closed for comments.