Eager transformations - shrink assets
Hi all,
I have trouble finding a solution to my idea for a eager transformation strategy, maybe you can help me out or point me in the right direction. I want to achieve the following:
- shrink image assets to the maximum height/width (whichever is greater should get limited) of 3000px during upload.
- the aspect ratio of asset should stay unchanged
Most assets I am using are 9000px (or even more) in width/height. However, I do not need the assets in more than 3000px width/height.
I what I want even possible? It feels like eager transformations target a slightly different use case.
Any ideas how to do that?
Thank you very much for your help!
-
Hi Olli,
Performing an eager transformation will generate a derived version of the asset, which will be stored in your cloud in addition to the original.
To achieve limiting the maximum dimension of an image to 3000px, you could include the eager transformation:
$maxdim_3000/if_iw_gt_ih_and_iw_gt_$maxdim,w_$maxdim/if_ih_gt_iw_and_ih_gt_$maxdim,h_$maxdim
If you would like to upload and store the asset with a height and width of 3000px, you could use an incoming transformation instead of an eager transformation.
Let me know if this makes sense?
0
Post is closed for comments.
Comments
1 comment