diff --git a/system/Images/Handlers/GDHandler.php b/system/Images/Handlers/GDHandler.php index de5278fbd6a6..2aa3cc967e9e 100644 --- a/system/Images/Handlers/GDHandler.php +++ b/system/Images/Handlers/GDHandler.php @@ -246,7 +246,8 @@ protected function process(string $action) $dest = $create($this->width, $this->height); - if ($this->image()->imageType === IMAGETYPE_PNG) // png we can actually preserve transparency + // for png and webp we can actually preserve transparency + if (in_array($this->image()->imageType, [IMAGETYPE_PNG, IMAGETYPE_WEBP], true)) { imagealphablending($dest, false); imagesavealpha($dest, true);