From 2230a5ffd84abea08479106bd2354800bc8eb44e Mon Sep 17 00:00:00 2001 From: rramiachraf <51409801+rramiachraf@users.noreply.github.com> Date: Mon, 24 Oct 2022 21:32:38 +0100 Subject: [PATCH] resizing images to reduce bandwidth usage --- proxy.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy.go b/proxy.go index 76bbb66..0e38159 100644 --- a/proxy.go +++ b/proxy.go @@ -30,7 +30,8 @@ func proxyHandler(w http.ResponseWriter, r *http.Request) { return } - url := fmt.Sprintf("https://images.genius.com/%s.%s", f, ext) + // first segment of URL resize the image to reduce bandwith usage. + url := fmt.Sprintf("https://t2.genius.com/unsafe/300x300/https://images.genius.com/%s.%s", f, ext) res, err := http.Get(url) if err != nil {