diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-18 17:08:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-18 17:08:58 +0300 |
commit | 1b60f304c2b61e1f50ad903f012469d857111e20 (patch) | |
tree | d79d5ecbfd7f07696fd4600f8891c204cb9540b9 /lib | |
parent | 4cd0b2253df2fdbb43d91b9331a63fa5afcb4326 (diff) | |
parent | 05bf8b444599893414449bd519c0b458939a6ee7 (diff) |
Merge pull request #32451 from nextcloud/fix/cropped-image-when-not-asked
Fix cropped image generated when not asked
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Preview/Generator.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php index e058a15bfa5..a19a19ef15f 100644 --- a/lib/private/Preview/Generator.php +++ b/lib/private/Preview/Generator.php @@ -144,6 +144,7 @@ class Generator { && ($specifications[0]['width'] <= 256 || $specifications[0]['height'] <= 256) && preg_match(Imaginary::supportedMimeTypes(), $mimeType) && $this->config->getSystemValueString('preview_imaginary_url', 'invalid') !== 'invalid') { + $crop = $specifications[0]['crop'] ?? false; $preview = $this->getSmallImagePreview($previewFolder, $file, $mimeType, $previewVersion, $crop); @@ -255,7 +256,7 @@ class Generator { continue; } - $preview = $this->helper->getThumbnail($provider, $file, 256, 256, true); + $preview = $this->helper->getThumbnail($provider, $file, 256, 256, $crop); if (!($preview instanceof IImage)) { continue; |