From d9c817f27ecd77a12df1e5f52e7f10dbeee54940 Mon Sep 17 00:00:00 2001 From: darodi <4682830+darodi@users.noreply.github.com> Date: Sat, 8 Apr 2023 01:45:18 +0200 Subject: [PATCH] webp as supported image --- internal/epub/image_processing.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/epub/image_processing.go b/internal/epub/image_processing.go index 678d427..3628235 100644 --- a/internal/epub/image_processing.go +++ b/internal/epub/image_processing.go @@ -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 }