$file->resize($width, $height = null, $quality = null)
Resizes the image by width and optionally by height
- since: Kirby 2.3.0
-
return ($file)
Example
// resize by width and height and echo the url
echo $page->image()->resize(300, 200);
// adjust the quality
echo $page->image()->resize(300, 200, 80);
// resize by height
echo $page->image()->resize(null, 200);
// resize by width
echo $page->image()->resize(300);