Browse Source

Add webp extension for resizing

pull/2217/head
byunghwa.yun 3 years ago
parent
commit
7374b5b473
  1. 2
      weed/server/volume_server_handlers_read.go

2
weed/server/volume_server_handlers_read.go

@ -264,7 +264,7 @@ func conditionallyResizeImages(originalDataReaderSeeker io.ReadSeeker, ext strin
} }
func shouldResizeImages(ext string, r *http.Request) (width, height int, mode string, shouldResize bool) { func shouldResizeImages(ext string, r *http.Request) (width, height int, mode string, shouldResize bool) {
if ext == ".png" || ext == ".jpg" || ext == ".jpeg" || ext == ".gif" {
if ext == ".png" || ext == ".jpg" || ext == ".jpeg" || ext == ".gif" || ext == ".webp" {
if r.FormValue("width") != "" { if r.FormValue("width") != "" {
width, _ = strconv.Atoi(r.FormValue("width")) width, _ = strconv.Atoi(r.FormValue("width"))
} }

Loading…
Cancel
Save