public static function get_width_key( $width, $height, $timber_image ) {
		if ( 0 === (int) $width ) {
			/**
			 * Calculate image width based on image ratio and height. We need a rounded value
			 * because we will use this number as an array key and for defining the srcset size in
			 * pixel values.
			 */
			return (int) round( $timber_image->aspect() * $height );
		}

		return (int) $width;
	}
public static function get_width_key( $width, $height, $timber_image ) {
		if ( 0 === (int) $width ) {
			/**
			 * Calculate image width based on image ratio and height. We need a rounded value
			 * because we will use this number as an array key and for defining the srcset size in
			 * pixel values.
			 */
			return (int) round( $timber_image->aspect() * $height );
		}

		return (int) $width;
	}
public static function get_width_key ( $ width , $ height , $ timber_image ) { if ( 0 === ( int ) $ width ) { /**
			 * Calculate image width based on image ratio and height. We need a rounded value
			 * because we will use this number as an array key and for defining the srcset size in
			 * pixel values.
			 */ return ( int ) round ( $ timber_image -> aspect ( ) * $ height ) ; } return ( int ) $ width ; }
Get the actual width at which the image will be displayed.

When 0 is passed to Timber as a width, it calculates the image ratio based on the height of
the image. We have to account for that, when we use the responsive image, because in the
srcset, there cant be a value like "image.jpg 0w". So we have to calculate the width based
on the values we have.

@since 0.9.3

@param  int          $width        The value of the resize parameter for width.
@param  int          $height       The value of the resize parameter for height.
@param  Timber\Image $timber_image Instance of TimberImage.

@return int The width at which the image will be displayed.
Get the actual width at which the image will be displayed .