From aef61a6c8f26085b957b5f547826e39a8d87d331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Thu, 28 Jul 2022 10:10:28 +0200 Subject: [PATCH] Media : Fix thumbnail generation --- app/Models/Media.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Models/Media.php b/app/Models/Media.php index bc7fe75..a18a21d 100644 --- a/app/Models/Media.php +++ b/app/Models/Media.php @@ -694,11 +694,13 @@ class Media extends Model } $im = $im->deconstructImages(); } + $im->setImageFormat(MediaExtension::gif); $storage->put( $this->preview_relative_path, $im->getImagesBlob() ); } else { + $im->setImageFormat(\pathinfo($this->preview_relative_path, \PATHINFO_EXTENSION)); if ($this->largeur >= $format->largeur || $this->hauteur >= $format->hauteur || $this->largeur == "") { $im->thumbnailImage($format->largeur, $format->hauteur, true); }