$file->thumb()
Creates a modified version of images The media manager takes care of generating those modified versions and putting them in the right place. This is normally the /media
folder of your installation, but could potentially also be a CDN or any other place.
Parameters
Name | Type | Default |
---|---|---|
$options | array |null |string |
null |
Return type
Kirby\Cms\FileVersion
|Kirby\Cms\File
Exceptions
Type | Description |
---|---|
Kirby\Exception\InvalidArgumentException |
Parent class
Options
You can use the following options in the options array (values are the default values):
Since 3.6.0
You can also set the format
option to convert an existing JPEG, GIF or PNG into a WebP or AVIF file method (value is the default value).
You can define presets of options in your config.php
. Learn more ›