From 2f664fe8263f9b9ac003735abcf0248feaa4dc3e Mon Sep 17 00:00:00 2001 From: InfiniteTF Date: Sun, 26 Sep 2021 02:01:45 +0200 Subject: [PATCH] Disable vips in Windows (#1767) --- pkg/image/thumbnail.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/image/thumbnail.go b/pkg/image/thumbnail.go index 69f047f02..841b53fec 100644 --- a/pkg/image/thumbnail.go +++ b/pkg/image/thumbnail.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "os/exec" + "runtime" "strings" "sync" @@ -56,7 +57,8 @@ func (e *ThumbnailEncoder) GetThumbnail(img *models.Image, maxSize int) ([]byte, return buf.Bytes(), nil } - if e.VipsPath != "" { + // vips has issues loading files from stdin on Windows + if e.VipsPath != "" && runtime.GOOS != "windows" { return e.getVipsThumbnail(buf, maxSize) } else { return e.getFFMPEGThumbnail(buf, format, maxSize, img.Path)