From e46eff8a26069ed21c074794ce507e195fb4bbc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szab=C3=B3=20Gerg=C5=91?= Date: Thu, 23 Aug 2018 17:32:18 +0200 Subject: [PATCH] Remove hard height constraint from previewing uploaded images (#3718) Fixes #3698. Credit to @gergo85 --- modules/backend/formwidgets/FileUpload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/backend/formwidgets/FileUpload.php b/modules/backend/formwidgets/FileUpload.php index 006ba8cfd..ad1395f29 100644 --- a/modules/backend/formwidgets/FileUpload.php +++ b/modules/backend/formwidgets/FileUpload.php @@ -212,7 +212,7 @@ class FileUpload extends FormWidgetBase : 'width: '.$this->imageHeight.'px;'; $cssDimensions .= ($this->imageHeight) - ? 'height: '.$this->imageHeight.'px;' + ? 'max-height: '.$this->imageHeight.'px;' : 'height: auto;'; } else { @@ -221,7 +221,7 @@ class FileUpload extends FormWidgetBase : 'width: auto;'; $cssDimensions .= ($this->imageHeight) - ? 'height: '.$this->imageHeight.'px;' + ? 'max-height: '.$this->imageHeight.'px;' : 'height: auto;'; }