Named transformation with user-defined variables not allowed

fahico98
fahico98 Member Posts: 6 āœ­
edited February 2 in General

I'm trying to define a named transformation for my web application user profile picture section for a cropped image, I defined the followed transformation in the transformation builder:

I'm working with Strict Transformations mode enabled and I tried to crop a public image with "upload" Delivery type just like this:

https://res.cloudinary.com/torrevia/image/upload/$w_100/$h_100/$x_50/$y_50/t_pp_crop/torrevia/users/avatars/default/adx0z2fq0wqo41oawoqb.jpg

But the given image was not delivered and I got an "401 Unauthorized" error. Debuging with Cloudinary Media Inspector Google Chrome extension it looks like this:

It shows the user defined variables ($w, $h, $x, $y) values assignment transformations as not allowed transformations.

If I set the "pp_crop" transformation with static values instead variables it works fine.

Can somebody help me with this ?

Thanks in advance.

Tagged:

Best Answer

  • Cloudinary Team
    Cloudinary Team Administrator, Cloudinary Staff Posts: 170 admin
    Answer āœ“

    Hi there,

    I think the reason this is not working is that you have strict transformations enabled. Dynamic transformations with strict transformation enabled will require a signed delivery URL. Please take a look at the following documentation to learn more:
    https://cloudinary.com/documentation/delivery_url_signatures

    Give that a try and let me know if you have any questions.

    Kind regards,

    Tia

    Helpful Links For You
    šŸ’¬ Share questions, connect with other users in our Cloudinary Community forums and Discord server!
    šŸ§‘ā€šŸŽ“ Join our Cloudinary Academy for free courses, workshops and other educational resources.
    šŸ“„ Read our documentation for in-depth details on Cloudinary product features and capabilities
    šŸ“° Check out the Cloudinary blog for the latest company news and insights

Answers

  • Cloudinary Team
    Cloudinary Team Administrator, Cloudinary Staff Posts: 170 admin

    Hi there,

    Thanks for reaching out.

    In your delivery URL, I see that you are putting a slash ( / ) between each transformation. You should use a comma instead .../$w_100,$h_100,$x_50,$y_50/t_pp_crop/...

    Can you make those adjustments and let me know how it goes?

    Kind regards,

    Tia

    Helpful Links For You
    šŸ’¬ Share questions, connect with other users in our Cloudinary Community forums and Discord server!
    šŸ§‘ā€šŸŽ“ Join our Cloudinary Academy for free courses, workshops and other educational resources.
    šŸ“„ Read our documentation for in-depth details on Cloudinary product features and capabilities
    šŸ“° Check out the Cloudinary blog for the latest company news and insights

  • fahico98
    fahico98 Member Posts: 6 āœ­
    edited February 2


  • fahico98
    fahico98 Member Posts: 6 āœ­

    Hi team,

    Thank you for your answer.

    I already tried with commas instead slashes but a got the same error.


  • johnr
    johnr Member Posts: 14 āœ­

    Hi Fahico,

    Great to know that this has been sorted out.

    If you have more questions please feel free to reach out!

    Best Regards,

    John