resizing images to reduce bandwidth usage
This commit is contained in:
parent
409f49a4c5
commit
2230a5ffd8
3
proxy.go
3
proxy.go
|
@ -30,7 +30,8 @@ func proxyHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
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)
|
res, err := http.Get(url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user