Treeshaking and performance

Tree shaking is available throughout the SDK.
Everything can be very granularly imported to ensure you only import what you need.

Actions

Without Tree-Shaking

   import {Resize} from "@cloudinary/url-gen/actions/resize";
   
   Resize.scale()
   Resize.crop()

With Tree-Shaking

 import {scale, crop} from '@cloudinary/url-gen/actions/resize';
 scale()
 crop()


Qualifier Values

Without Tree-Shaking

   import {Format} from "@cloudinary/url-gen/qualifiers/format";
   
   Format.png()
   Format.jpg()

With Tree-Shaking

    import {jpg, png} from "@cloudinary/url-gen/qualifiers/format";
    
    png()
    jpg()