Add default width parameter to resizer

This commit is contained in:
Lewis Dale 2023-08-25 21:26:41 +01:00
parent 1aa76cb053
commit 9de91033ba

View File

@ -12,7 +12,7 @@ class ResizeParams
public function __construct(array $params) public function __construct(array $params)
{ {
$this->width = intval($params['width']) ?: null; $this->width = intval($params['width']) ?: intval($_ENV["DEFAULT_WIDTH"]);
$this->height = intval($params['height']) ?: null; $this->height = intval($params['height']) ?: null;
$this->quality = isset($params['quality']) ? intval($params['quality']) : null; $this->quality = isset($params['quality']) ? intval($params['quality']) : null;
} }