Skip to content

Kirby 4.5.0

$filemodifications->resize()

Resizes the file with the given width and height while keeping the aspect ratio.

$filemodifications->resize(?int $width = null, ?int $height = null, ?int $quality = null): Kirby\Cms\FileVersion|Kirby\Cms\File|Kirby\Filesystem\Asset

Parameters

Name Type Default
$width int|null null
$height int|null null
$quality int|null null

Return type

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

Exceptions

Parent class

Kirby\Cms\FileModifications