Skip to content

Kirby 3.5.7.1

$dimensions->fitHeight()

Recalculates the width and height to fit the given height

$dimensions->fitHeight(int $fit = null, bool $force = false): Kirby\Image\Dimensions

Parameters

Name Type Default Description
$fit int null the max height
$force bool false If true, the dimensions will be
upscaled to fit the box if smaller

Return type

Kirby\Image\Dimensions

This method modifies the existing $dimensions object it is applied to and returns it again.

Parent class

Kirby\Image\Dimensions