Skip to content

Kirby 3.9.8

$dimensions->crop()

Crops the dimensions by width and height

$dimensions->crop(int $width, ?int $height = null): Kirby\Image\Dimensions

Parameters

Name Type Default
$width * int
$height int|null null

Return type

Kirby\Image\Dimensions

This method does not modify the existing $dimensions object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Image\Dimensions