From c63713774baff0e64503f1287c738f4915e44705 Mon Sep 17 00:00:00 2001 From: mauroparente Date: Wed, 18 Aug 2021 23:15:35 +0200 Subject: [PATCH] Fix image resize https://github.com/chrislusf/seaweedfs/issues/2262 --- weed/server/filer_server_handlers_read.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.go index fc9cacf39..054a1bd00 100644 --- a/weed/server/filer_server_handlers_read.go +++ b/weed/server/filer_server_handlers_read.go @@ -142,6 +142,9 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) if rangeReq := r.Header.Get("Range"); rangeReq == "" { ext := filepath.Ext(filename) + if len(ext) > 0 { + ext = strings.ToLower(ext) + } width, height, mode, shouldResize := shouldResizeImages(ext, r) if shouldResize { data, err := filer.ReadAll(fs.filer.MasterClient, entry.Chunks)