Pageimage::maxSize()

Return an image no larger than the given width and height

Usage

// basic usage
$pageimage = $pageimage->maxSize(int $width, int $height);

// usage with all arguments
$pageimage = $pageimage->maxSize(int $width, int $height, array $options = []);

Arguments

NameType(s)Description
$widthint

Max allowed width

$heightint

Max allowed height

$options (optional)array

See Pageimage::size() method for options, or these additional options:

  • allowOriginal (bool): Allow original image to be returned if already within max requested dimensions? Default:false

Return value


Pageimage methods and properties

API reference based on ProcessWire core version 3.0.251