Skip to content

Commit

Permalink
chore(image-proxy): encode with highest res by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ncarlier committed Oct 6, 2024
1 parent 73018bd commit 1f7853a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/image-proxy/image-proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 1f7853a

Please sign in to comment.