For the most common usecase, images should be rendered with the same height to widht ratio as the original image file.
This requires setting the--image_widthand--image_heightvariables to the dimensions of the original image file as in this example.

If a custom size is set for the image by the content editor, the image will be scaled and cropped to those dimensions.
This requires setting the--image_widthand--image_heightvariables to the dimensions specified in the CMS as in this example. If only one dimension is set, the other
should be scaled in the original ratio:
For example, if the file is 800 x 600 pixels and the width is set to 400 by the editor, the height should be 300.

All images can be displayed in the intended ratio with a fixed height (instead of fixed width) instead.
Use --image-local_height to set the intended height (defaults to 500px).

For images from external sources the size of the original image is not known. Use this slightly different markup in that case to set the image size dynamically.

External images can also be displayed in custom sizes. Simply set either --image_width or
--image_height to do so. If only one value is set, the image will keep its natural ratio.
If both are set, the image will be cropped.

Treat SVG images like external images for automatic sizing
Treat SVGs like external images, can also be used for custom sizing