Is the order of transformations in a preset guaranteed?

Comments

6 comments

  • Avatar
    Eyal Katz Talmon

    Hi,

    Thank you for reaching out.

    I'm checking your inquiry with the team and will update soon with our insights.

    Warmest regards,
    Eyal

    1
    Comment actions Permalink
  • Avatar
    Eyal Katz Talmon

    Hi Nishant,

    The order of transformations in the Upload response is the same as mentioned in the `eager` argument of the `upload` method, Though, In your case, I'd recommend identifying the "round" version of the image by searching the `r_max` string in the `transformation` element of the eager response. This way you're fail-proof from any changes that may take place on our backend (no such change is planned).

    Hope this helps, please let me know if you have any further questions.

    Thanks,
    Eyal

    1
    Comment actions Permalink
  • Avatar
    Nishant Neeraj

    Hey thanks for the response, I appreciate it. I am using a preset, so I guess the order is going to be the order it shows in the preset UI.

    So, essentially there is no way to tell which URL is what transformation -- you will have to infer it from the transformation string. Cool, I can do that.

    It would be great if one could name transformation and the eager array has transformation_name attribute in each transformation. But, for now I can work with transformation string.

    Thanks again,
    Nishant

    0
    Comment actions Permalink
  • Avatar
    Marissa Masangcay

    Hi Nishant,

    I'm not sure if you've seen the feature before but we actually do support "named transformations" in which you can name and predefine a set of transformations that you want to apply to your resources so that you don't have to type out the same set of transformations to apply for each and every image. This would also help you identify which transformation is which as the URL will include the parameter t_<named_transformation>. You can read more about this in our docs here:

    https://cloudinary.com/documentation/image_transformations#named_transformations

    and you can view the following article with video tutorials here:

    https://support.cloudinary.com/hc/en-us/articles/360018902952-Developing-and-Using-Named-Transformations-with-Cloudinary-Images-and-Videos

    Hope this helps!

    0
    Comment actions Permalink
  • Avatar
    Nishant Neeraj

    Hey Marissa,

    ha ha, what a coincident I saw the feature moments after my comment and I was going to experiment with that and write back here. Glad you mentioned.

    Thanks for vouching this for me. I will give it a go.
    Nishant

    0
    Comment actions Permalink
  • Avatar
    Marissa Masangcay

    Hi Nishant,

    Great I'm glad to hear that! As always we're here if you have any questions and always please feel free as well to open a direct support ticket with us at https://support.cloudinary.com/hc/en-us/requests/new

    Cheers.

    0
    Comment actions Permalink

Please sign in to leave a comment.