$asset->crop()
Crops the image by the given width and height
$asset->crop(int $width, int|null $height = null, mixed $options = null): FileVersion|File|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