Variable height for image assets in Django

Comments

1 comment

  • Avatar
    Erwin Lukas

    Hi Howard,

    In digital imaging, the image is stored as pixels, physical units such as centimeters, inches, is usually a calculated based on this pixel dimension and other metadata, such as DPI (Dot Per Inch) or PPI (Pixel Per Inch). So dimensions in cm shouldn't be relevant for this intent & purposes.

    With that said, if you want to transform to 52x40px, you can specify width and height values. Example:

    https://res.cloudinary.com/demo/image/upload/w_52,h_40/sample.jpg.

    By default the above will do `crop: scaling`. To learn different kind of cropping, please refer to the following documentation: https://cloudinary.com/documentation/transformation_reference#c_crop_resize

    Hope this helps, let me know if you have any question.

    Regards,
    Erwin Lukas

    0
    Comment actions Permalink

Please sign in to leave a comment.