Question about applying upload presets on initial upload, are all the derived images based on these initial presets?
When initially uploading an image for the first time, if I create an upload preset and name it 'Global' and it uses the following parameters:
Discard original file name: true
Overwrite: true
Use filename or externally defined public ID: true
Unique filename: false
Delivery type: upload
Access mode: public
Incoming Transformation: c_limit,dpr_auto,h_1000,q_auto,w_1000
Eager Transformations: c_limit,dpr_auto,f_auto,h_1000,q_auto,w_1000
Allowed formats: jpg, jpeg, png
Am I correct to assume that when the initial file is uploaded, that all my images that I have specified to use the preset 'Global'
will have all these transformations applied to them automatically?
If so, does that also mean that I don't need to specify dpr:auto, f:auto, crop:limit etc in the transformation since they were already done initially?
Are all the derived images automatically using the parameters that I set in the global presets?
-
@Jackie
You are right that this will be applied globally if it's set as the default upload preset and default media library preset. The one adjustment we need to do is with regards to dpr_auto and f_auto. We actually need to list out all variations of those transformations. For instance `f_auto` would be theses:
- f_auto
- f_webp
- f_webp,fl_awebp
- f_wdp
We would need to do the same for dpr_auto, but in order for you to use dpr_auto, you'll need to include responsive library (https://cloudinary.com/documentation/responsive_images#responsive_design_with_support_for_retina_and_hidpi_devices). If you do end up using that, you would also need to generate the variations:
- dpr_1.0
- dpr_2.0
- dpr_3.0
In the end, the eager transformations should have these combinations:
- c_limit,dpr_1.0,f_auto,h_1000,q_auto,w_1000/jpg
- c_limit,dpr_2.0,f_auto,h_1000,q_auto,w_1000/jpg
- c_limit,dpr_3.0,f_auto,h_1000,q_auto,w_1000/jpg
- c_limit,dpr_1.0,f_webp,h_1000,q_auto,w_1000/jpg
- c_limit,dpr_2.0,f_webp,h_1000,q_auto,w_1000/jpg
- c_limit,dpr_3.0,f_webp,h_1000,q_auto,w_1000/jpg
- c_limit,dpr_1.0,f_webp,fl_awebp,h_1000,q_auto,w_1000/jpg
- c_limit,dpr_2.0,f_webp,fl_awebp,h_1000,q_auto,w_1000/jpg
- c_limit,dpr_3.0,f_webp,fl_awebp,h_1000,q_auto,w_1000/jpg
- c_limit,dpr_1.0,f_wdp,h_1000,q_auto,w_1000/jpg
- c_limit,dpr_2.0,f_wdp,h_1000,q_auto,w_1000/jpg
- c_limit,dpr_3.0,f_wdp,h_1000,q_auto,w_1000/jpg
And you'll need to remove the `dpr_auto` form the incoming transformation as this just doing dpr_1.0 which is the original. If you do this just be conscious of the number of transformations you'll be generating.
Lastly, when you are referring to an image on your site, you'll need to use the exact transformation that you requested in the eager transformation so that we don't generate another variation. For example, if I generate eagerly `c_limit,dpr_3.0,f_wdp,h_1000,q_auto,w_1000` then my url should be `https://res.cloudinary.com/cloudname/image/upload/c_limit,dpr_3.0,f_wdp,h_1000,q_auto,w_1000/<public_id>.jpg`
0
Post is closed for comments.
Comments
1 comment