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

@@ -17,7 +17,7 @@ func MaybePreprocessImage(filename string, data []byte, width, height int) (resi
ext := filepath.Ext(filename)
ext = strings.ToLower(ext)
switch ext {
case ".png", ".gif":
case ".png", ".gif", ".webp":
return Resized(ext, data, width, height)
case ".jpg", ".jpeg":
data = FixJpgOrientation(data)