How Cloudinary handle redundant/duplicated transformation query?
Hi, all
Just like what I said in this post title
For example,
If I use something like `c_fill,c_crop` in the URL API
I'm not sure how Cld handle that.
Is there any pattern which Cld handle such case?
Thanks,
-
Hi, thanks for reaching out!
Generally speaking, when configuring a transformation parameter more than once in the same transformation section (i.e not separated by a '/' character), only the latest value that is assigned to the parameter is honored, and the rest are ignored.
For instance -
- Crop parameter - c_fill,c_crop - Notice that the "crop" value is honored:
https://res.cloudinary.com/demo/image/upload/c_fill,c_crop,w_300,h_300/sample.jpg - Effect parameter - e_grayscale,e_cartoonify - Notice that only the "cartoonify" effect was applied:
https://res.cloudinary.com/demo/image/upload/e_grayscale,e_cartoonify/sample.jpg - Width parameter - w_200,w_400 - Notice that the image is scaled to a width of 400px:
https://res.cloudinary.com/demo/image/upload/w_200,w_400/sample.jpg
Keep in mind, that when it comes to quota consumption and billing, although the "redundant" parameters do not affect the transformation semantics, they do change the transformation string, and therefore create different derived resources (that might look the same). Each derived resource creation is being counted against your transformation quota, in addition to the storage quota. This means that the below URLs would be counted as 3 transformations, and 29.2*3 = 87.6 KB of storage -
- https://res.cloudinary.com/demo/image/upload/c_fill,c_crop,w_300,h_300/sample.jpg
- https://res.cloudinary.com/demo/image/upload/c_fit,c_crop,w_300,h_300/sample.jpg
- https://res.cloudinary.com/demo/image/upload/c_limit,c_crop,w_300,h_300/sample.jpg
Note, that if you want to apply multiple flags, you can provide the "flag" URL parameter (fl_<flag>) with multiple flags, separated with a dot '.' character, e.g - fl_<flag1>.<flag2>.<flag3>.
If there are any specific transformation parameters you're interested in using "redundantly", please let me know, and I'll test and verify their semantics.
Cheers,
Eyal
0 - Crop parameter - c_fill,c_crop - Notice that the "crop" value is honored:
Post is closed for comments.
Comments
1 comment