Fix #4744: Banner image orientation not being processed

This commit is contained in:
Sam Sheridan 2021-01-07 07:17:14 -05:00 committed by GitHub
parent 5d2db8ad73
commit bf628b84f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,7 @@ HumHub Changelog
- Fix #4649: Success message rendered although password validation failed
- Fix #4717: Repsonsive layout alignment issue on small screens
- Fix #4715: Call to `Content::canArchive()` throws error on global content
- Fix #4744: Banner image orientation not being processed
- Fix #4743: Hide "Like" link when no permission "Can like"

View File

@ -8,6 +8,7 @@
namespace humhub\libs;
use humhub\modules\file\libs\ImageHelper;
use Imagine\Image\Box;
use Imagine\Image\ManipulatorInterface;
use yii\imagine\Image;
@ -74,6 +75,7 @@ class ProfileBannerImage extends ProfileImage
// Make sure original file is max. 800 width
$image = Image::getImagine()->open($file);
ImageHelper::fixJpegOrientation($image, $file);
if ($image->getSize()->getWidth() > 2000) {
$image->resize($image->getSize()->widen(2000));
}