Skip to content

🎧 Your Personal Streaming Service

Add support for reading webp artwork

Deluan6c8535c54a90
diff --git a/consts/mime_types.go b/consts/mime_types.go
index cb15d32eb..9a4522e2a 100644
--- a/consts/mime_types.go
+++ b/consts/mime_types.go
@@ -25,6 +25,7 @@ func init() {
".gif": "image/gif",
".jpg": "image/jpeg",
".jpeg": "image/jpeg",
+ ".webp": "image/webp",
".png": "image/png",
".bmp": "image/bmp",
}
diff --git a/core/artwork.go b/core/artwork.go
index aae458325..56abc337d 100644
--- a/core/artwork.go
+++ b/core/artwork.go
@@ -14,6 +14,8 @@ import (
"strings"
"time"
+ _ "golang.org/x/image/webp"
+
"github.com/deluan/navidrome/conf"
"github.com/deluan/navidrome/consts"
"github.com/deluan/navidrome/log"
diff --git a/go.mod b/go.mod
index 868b38934..af6ae49bd 100644
--- a/go.mod
+++ b/go.mod
@@ -35,6 +35,7 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.7.1
+ golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8
golang.org/x/net v0.0.0-20200625001655-4c5254603344 // indirect
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect
golang.org/x/text v0.3.3 // indirect