浏览代码

Change `IMGPROXY_AVIF_SPEED` and `IMGPROXY_FORMAT_QUALITY` default values

DarthSim 4 月之前
父节点
当前提交
181fffee5b
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 2 0
      CHANGELOG.md
  2. 6 2
      config/config.go

+ 2 - 0
CHANGELOG.md

@@ -8,6 +8,8 @@
 - (pro) Add [IMGPROXY_OBJECT_DETECTION_SWAP_RB](https://docs.imgproxy.net/latest/configuration/options#IMGPROXY_OBJECT_DETECTION_SWAP_RB) config.
 
 ### Changed
+- Change `IMGPROXY_AVIF_SPEED` default value to `8`.
+- Change `IMGPROXY_FORMAT_QUALITY` default value to `webp=79,avif=63,jxl=77`.
 - Rename `IMGPROXY_ENABLE_WEBP_DETECTION` to `IMGPROXY_AUTO_WEBP`. The old name is deprecated but still supported.
 - Rename `IMGPROXY_ENABLE_AVIF_DETECTION` to `IMGPROXY_AUTO_AVIF`. The old name is deprecated but still supported.
 

+ 6 - 2
config/config.go

@@ -255,10 +255,14 @@ func Reset() {
 	PngInterlaced = false
 	PngQuantize = false
 	PngQuantizationColors = 256
-	AvifSpeed = 9
+	AvifSpeed = 8
 	JxlEffort = 4
 	Quality = 80
-	FormatQuality = map[imagetype.Type]int{imagetype.AVIF: 65, imagetype.JXL: 77}
+	FormatQuality = map[imagetype.Type]int{
+		imagetype.WEBP: 79,
+		imagetype.AVIF: 63,
+		imagetype.JXL:  77,
+	}
 	StripMetadata = true
 	KeepCopyright = true
 	StripColorProfile = true