Sign up to our newsletter to receive updates on Winter CMS releases,
new features in the works, and much more.
We'll never spam or give this address away.
Note: The image resizing functionality requires a cache driver that persists cache data between requests in order to function,
arrayis not a supported cache driver if you wish to use this functionality.
The basic parameters provided to the ImageResizer are
(int) $height, and
$height is falsey or
'auto', that value is calculated using original image ratio (automatic proportional scaling).
The following elements are supported in the options array are supported:
||How the image should be fitted to dimensions||
||Offset the crop of the resized image||
||Quality of the resized image||
||Amount to sharpen the image||
mode option allows you to specify how the image should be resized. The available modes are as follows:
||Automatically choose between
||Resize to the exact dimensions given, without preserving aspect ratio|
||Resize to the given height and adapt the width to preserve aspect ratio|
||Resize to the given width and adapt the height to preserve aspect ratio|
||Crop to the given dimensions after fitting as much of the image as possible inside those|
||Fit the image inside the given maximal dimensions, keeping the aspect ratio|
The available sources that images can be resized from are as follows:
Available sources can be extended by listening to the