From 1f7853a07ba638f9347dfce03ec9129748564c92 Mon Sep 17 00:00:00 2001 From: Nicolas Carlier Date: Sun, 6 Oct 2024 07:06:18 +0000 Subject: [PATCH] chore(image-proxy): encode with highest res by default --- pkg/image-proxy/image-proxy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/image-proxy/image-proxy.go b/pkg/image-proxy/image-proxy.go index 834240c4..08eaa847 100644 --- a/pkg/image-proxy/image-proxy.go +++ b/pkg/image-proxy/image-proxy.go @@ -65,8 +65,8 @@ func (ip *ImageProxy) URL() string { // Encode image URL to Image Proxy path func (ip *ImageProxy) Encode(url, size string) string { if size == "" { - // use first size by default - size = ip.sizes[0] + // use last size by default (aka: highest resolution) + size = ip.sizes[len(ip.sizes)-1] } return ip.URL() + "/" + ip.getHash(url, size) + "/resize:fit:" + size + "/" + base64.StdEncoding.EncodeToString([]byte(url)) }