Skip to content

Kirby 4.4.1

$asset->crop()

Crops the image by the given width and height

$asset->crop(int $width, ?int $height = null, $options = null): Kirby\Cms\FileVersion|Kirby\Cms\File|Kirby\Filesystem\Asset

Parameters

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

Return type

Kirby\Cms\FileVersion|Kirby\Cms\File|Kirby\Filesystem\Asset

Parent class

Kirby\Filesystem\Asset