From ee304dd7b9d297b9f4aa1b40bdbe27502eaabcbc Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 3 Feb 2018 20:14:40 +0100 Subject: [PATCH] When generating thumbnails, infer width properly when null is passed. --- models/Thumbnail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/Thumbnail.php b/models/Thumbnail.php index 5dca12c..2298735 100644 --- a/models/Thumbnail.php +++ b/models/Thumbnail.php @@ -109,7 +109,7 @@ class Thumbnail if (!$this->height) $this->height = ceil($this->width / $this->image->ratio()); elseif (!$this->width) - $this->width = ceil($this->height / $this->image->ratio()); + $this->width = ceil($this->height * $this->image->ratio()); // Inferring the height from the original image's ratio? if (!$fit)