[ImageEncoder] Change preferred type to always be WEBP

This commit is contained in:
Hugo Sales 2021-04-18 20:39:43 +00:00
parent 1b1b3007db
commit 3a7e92ed01
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 0 additions and 8 deletions

View File

@ -34,17 +34,9 @@ class ImageEncoder extends Plugin
{ {
/** /**
* Several obscure file types should be normalized to WebP on resize. * Several obscure file types should be normalized to WebP on resize.
*
* Keeps only GIF (if animated) and WebP formats
*
* @return int
*/ */
public function preferredType(): int public function preferredType(): int
{ {
if ($this->type == IMAGETYPE_GIF && $this->animated) {
return $this->type;
}
return IMAGETYPE_WEBP; return IMAGETYPE_WEBP;
} }