$asset->crop()
Crops the image by the given width and height
$asset->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 $asset object it is applied to and returns it again.