webp as supported image

This commit is contained in:
darodi 2023-04-08 01:45:18 +02:00 committed by celogeek
parent c1b67a250e
commit d9c817f27e
Signed by: celogeek
SSH Key Fingerprint: SHA256:njNJLzoLQdbV9PC6ehcruRb0QnEgxABoCYZ+0+aUIYc

View File

@ -16,6 +16,8 @@ import (
"strings"
"sync"
_ "golang.org/x/image/webp"
"github.com/disintegration/gift"
"github.com/nwaples/rardecode"
pdfimage "github.com/raff/pdfreader/image"
@ -245,7 +247,7 @@ func LoadImages(path string, options *ImageOptions, dry bool) ([]*Image, error)
func isSupportedImage(path string) bool {
switch strings.ToLower(filepath.Ext(path)) {
case ".jpg", ".jpeg", ".png":
case ".jpg", ".jpeg", ".png", ".webp":
{
return true
}