diff --git a/protected/humhub/docs/CHANGELOG.md b/protected/humhub/docs/CHANGELOG.md index 12ed90d08b..182b92cd4c 100644 --- a/protected/humhub/docs/CHANGELOG.md +++ b/protected/humhub/docs/CHANGELOG.md @@ -2,13 +2,14 @@ HumHub Change Log ================= -1.5.1 (April 17, 2020) +1.5.1 (April 18, 2020) ---------------------- - Fix #4001: LDAP user sync error - Fix #4004: Missing translation strings - Fix #4009: Yii queue error handling broken - Fix #4008: Some richtext images are embedded as Base64 +- Fix #4019: Animated Gifs not handled correctly with GMagick extension 1.5.0 (April 15, 2020) diff --git a/protected/humhub/modules/file/converter/PreviewImage.php b/protected/humhub/modules/file/converter/PreviewImage.php index b596780938..bfee7ccb59 100644 --- a/protected/humhub/modules/file/converter/PreviewImage.php +++ b/protected/humhub/modules/file/converter/PreviewImage.php @@ -83,7 +83,12 @@ class PreviewImage extends BaseConverter $image->resize($image->getSize()->widen($this->options['width'])); } - $image->save($this->file->store->get($fileName), ['format' => 'png']); + $options = ['format' => 'png']; + if (!($image instanceof \Imagine\Gd\Image) && count($image->layers()) > 1) { + $options = ['format' => 'gif', 'animated' => true]; + } + + $image->save($this->file->store->get($fileName), $options); }