WebP转换质量转移到WebP策略配置

This commit is contained in:
刘祥超
2023-12-11 10:17:46 +08:00
parent acd78085fa
commit 615fdc24d8
2 changed files with 1 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ type WebPImagePolicy struct {
RequireCache bool `yaml:"requireCache" json:"requireCache"` // 需要在缓存条件下进行
MinLength *shared.SizeCapacity `yaml:"minLength" json:"minLength"` // 最小压缩对象比如4m, 24k
MaxLength *shared.SizeCapacity `yaml:"maxLength" json:"maxLength"` // 最大压缩对象
Quality int `yaml:"quality" json:"quality"` // 生成的图片质量0-100
minLength int64
maxLength int64

View File

@@ -12,8 +12,6 @@ type WebPImageConfig struct {
IsPrior bool `yaml:"isPrior" json:"isPrior"`
IsOn bool `yaml:"isOn" json:"isOn"`
Quality int `yaml:"quality" json:"quality"` // 0-100
MinLength *shared.SizeCapacity `yaml:"minLength" json:"minLength"` // 最小压缩对象比如4m, 24k
MaxLength *shared.SizeCapacity `yaml:"maxLength" json:"maxLength"` // 最大压缩对象
MimeTypes []string `yaml:"mimeTypes" json:"mimeTypes"` // 支持的MimeType支持image/*这样的通配符使用