Browse Source

Update maximum and default AVIF speed

DarthSim 2 years ago
parent
commit
9175c66fee
3 changed files with 6 additions and 4 deletions
  1. 2 0
      CHANGELOG.md
  2. 3 3
      config/config.go
  3. 1 1
      docs/configuration.md

+ 2 - 0
CHANGELOG.md

@@ -1,6 +1,8 @@
 # Changelog
 
 ## [Unreleased]
+### Change
+- Change maximum and default values of `IMGPROXY_AVIF_SPEED` to `9`.
 
 ## [3.18.0] - 2023-05-31
 ### Add

+ 3 - 3
config/config.go

@@ -242,7 +242,7 @@ func Reset() {
 	PngInterlaced = false
 	PngQuantize = false
 	PngQuantizationColors = 256
-	AvifSpeed = 8
+	AvifSpeed = 9
 	Quality = 80
 	FormatQuality = map[imagetype.Type]int{imagetype.AVIF: 65}
 	StripMetadata = true
@@ -658,8 +658,8 @@ func Configure() error {
 
 	if AvifSpeed < 0 {
 		return fmt.Errorf("Avif speed should be greater than 0, now - %d\n", AvifSpeed)
-	} else if AvifSpeed > 8 {
-		return fmt.Errorf("Avif speed can't be greater than 8, now - %d\n", AvifSpeed)
+	} else if AvifSpeed > 9 {
+		return fmt.Errorf("Avif speed can't be greater than 9, now - %d\n", AvifSpeed)
 	}
 
 	if Quality <= 0 {

+ 1 - 1
docs/configuration.md

@@ -176,7 +176,7 @@ When cookie forwarding is activated, by default, imgproxy assumes the scope of t
 
 ### Advanced AVIF compression
 
-* `IMGPROXY_AVIF_SPEED`: controls the CPU effort spent improving compression. The lowest speed is at 0 and the fastest is at 8. Default: `8`
+* `IMGPROXY_AVIF_SPEED`: controls the CPU effort spent improving compression. The lowest speed is at 0 and the fastest is at 9. Default: `9`
 
 ### Autoquality