Browse Source

Change the default AVIF quality and speed

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

+ 3 - 0
CHANGELOG.md

@@ -1,6 +1,9 @@
 # Changelog
 
 ## [Unreleased]
+### Change
+- Change `IMGPROXY_FORMAT_QUALITY` default value to `avif=65`.
+- Change `IMGPROXY_AVIF_SPEED` default value to `8`.
 
 ## [3.11.0] - 2022-11-17
 ### Add

+ 2 - 2
config/config.go

@@ -224,9 +224,9 @@ func Reset() {
 	PngInterlaced = false
 	PngQuantize = false
 	PngQuantizationColors = 256
-	AvifSpeed = 5
+	AvifSpeed = 8
 	Quality = 80
-	FormatQuality = map[imagetype.Type]int{imagetype.AVIF: 50}
+	FormatQuality = map[imagetype.Type]int{imagetype.AVIF: 65}
 	StripMetadata = true
 	KeepCopyright = true
 	StripColorProfile = true

+ 2 - 2
docs/configuration.md

@@ -123,7 +123,7 @@ When cookie forwarding is activated, by default, imgproxy assumes the scope of t
 ## Compression
 
 * `IMGPROXY_QUALITY`: the default quality of the resultant image, percentage. Default: `80`
-* `IMGPROXY_FORMAT_QUALITY`: default quality of the resulting image per format, separated by commas. Example: `jpeg=70,avif=40,webp=60`. When a value for the resulting format is not set, the `IMGPROXY_QUALITY` value is used. Default: `avif=50`
+* `IMGPROXY_FORMAT_QUALITY`: default quality of the resulting image per format, separated by commas. Example: `jpeg=70,avif=40,webp=60`. When a value for the resulting format is not set, the `IMGPROXY_QUALITY` value is used. Default: `avif=65`
 
 ### Advanced JPEG compression
 
@@ -156,7 +156,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: `5`
+* `IMGPROXY_AVIF_SPEED`: controls the CPU effort spent improving compression. The lowest speed is at 0 and the fastest is at 8. Default: `8`
 
 ### Autoquality