diff --git a/inc/Service/Media/LibMagickMediaHandler.php b/inc/Service/Media/LibMagickMediaHandler.php index 5f7fcd98..d57333b4 100644 --- a/inc/Service/Media/LibMagickMediaHandler.php +++ b/inc/Service/Media/LibMagickMediaHandler.php @@ -380,7 +380,10 @@ class LibMagickMediaHandler implements MediaHandler { $this->move_or_link_or_copy($media_file_kind, $media_file_path, $media_out_path); - if ($width <= $thumb_max_width && $height >= $thumb_max_height) { + if ( + $width <= $thumb_max_width && $height <= $thumb_max_height + && !(self::mimeSupportAnimation($media_file_mime) && $this->frames_for_animated_thumbs !== self::THUMB_KEEP_FRAMES_ALL) + ) { $thumb_out_path = $thumb_preferred_out_file_basepath . '.' . Metadata\mime_to_ext($media_file_mime); if (!Fs\link_or_copy($media_out_path, $thumb_out_path)) { throw new MediaException("Could not link or copy '$media_out_path' to '$thumb_out_path'", MediaException::ERR_IO_ERR);