Skip to content

Kirby 5.0.4

$fileModifications->crop()

Crops the image by the given width and height

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

Parameters

Name Type Default
$widthrequired int no default value
$height intornull null
$options mixed null

Return types

Kirby\Cms\FileVersionorKirby\Cms\FileorKirby\Filesystem\Asset

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

Parent class

Kirby\Cms\FileModifications