From c64f1af77c5af14ceda018fbe7554d35ccbc5b3d Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Mon, 11 Dec 2023 10:17:46 +0800 Subject: [PATCH] =?UTF-8?q?WebP=E8=BD=AC=E6=8D=A2=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E8=BD=AC=E7=A7=BB=E5=88=B0WebP=E7=AD=96=E7=95=A5=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/nodeconfigs/image_webp_policy.go | 1 + pkg/serverconfigs/image_webp_config.go | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/nodeconfigs/image_webp_policy.go b/pkg/nodeconfigs/image_webp_policy.go index 72abcae..320627c 100644 --- a/pkg/nodeconfigs/image_webp_policy.go +++ b/pkg/nodeconfigs/image_webp_policy.go @@ -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 diff --git a/pkg/serverconfigs/image_webp_config.go b/pkg/serverconfigs/image_webp_config.go index f4a6b52..913bfcc 100644 --- a/pkg/serverconfigs/image_webp_config.go +++ b/pkg/serverconfigs/image_webp_config.go @@ -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/*这样的通配符使用