WebP resize support

This commit is contained in:
Vitaly Baev
2017-03-31 09:56:00 +03:00
parent a337b844ec
commit 7ab9160ee1
3 changed files with 5 additions and 2 deletions

View File

@@ -136,7 +136,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
}
}
}
if ext == ".png" || ext == ".jpg" || ext == ".gif" {
if ext == ".png" || ext == ".jpg" || ext == ".gif"|| ext == ".webp" {
width, height := 0, 0
if r.FormValue("width") != "" {
width, _ = strconv.Atoi(r.FormValue("width"))