mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-05-30 14:25:18 +02:00
add support for webp encoding
This commit is contained in:
parent
ef50c1f9a6
commit
0a89d43f75
4 changed files with 79 additions and 22 deletions
3
data.go
3
data.go
|
|
@ -20,6 +20,7 @@ const (
|
|||
optFormatJPEG = "jpeg"
|
||||
optFormatPNG = "png"
|
||||
optFormatTIFF = "tiff"
|
||||
optFormatWEBP = "webp"
|
||||
optRotatePrefix = "r"
|
||||
optQualityPrefix = "q"
|
||||
optSignaturePrefix = "s"
|
||||
|
|
@ -247,7 +248,7 @@ func ParseOptions(str string) Options {
|
|||
options.FlipHorizontal = true
|
||||
case opt == optScaleUp: // this option is intentionally not documented above
|
||||
options.ScaleUp = true
|
||||
case opt == optFormatJPEG, opt == optFormatPNG, opt == optFormatTIFF:
|
||||
case opt == optFormatJPEG, opt == optFormatPNG, opt == optFormatTIFF, opt == optFormatWEBP:
|
||||
options.Format = opt
|
||||
case opt == optSmartCrop:
|
||||
options.SmartCrop = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue