$fileModifications->resize()
Resizes the file with the given width and height while keeping the aspect ratio.
$fileModifications->resize(int|null $width = null, int|null $height = null, int|null $quality = null): Kirby\Cms\FileVersion|Kirby\Cms\File|Kirby\Filesystem\Asset
Parameters
Name | Type | Default |
---|---|---|
$width | int ornull |
null
|
$height | int ornull |
null
|
$quality | int ornull |
null
|
Return types
Kirby\Cms\FileVersion
orKirby\Cms\File
orKirby\Filesystem\Asset
This method modifies the existing $filemodifications
object it is applied to and returns it again.
Exceptions
Type | Description |
---|---|
Kirby\Exception\InvalidArgumentException |
Parent class
Kirby\Cms\FileModifications