Variable height for image assets in Django


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:,h_40/sample.jpg.

    By default the above will do `crop: scaling`. To learn different kind of cropping, please refer to the following documentation:

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

    Erwin Lukas

    Comment actions Permalink

Please sign in to leave a comment.