From 27bf8505e11bf13f1e25316d6932bf6bac5ca5e3 Mon Sep 17 00:00:00 2001 From: DarthSim Date: Sun, 27 Nov 2022 19:39:41 +0600 Subject: [PATCH] Change the default AVIF quality and speed --- CHANGELOG.md | 3 +++ config/config.go | 4 ++-- docs/configuration.md | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f7018ec..5b556edc 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/config/config.go b/config/config.go index f820acf0..efd6e531 100644 --- a/config/config.go +++ b/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 diff --git a/docs/configuration.md b/docs/configuration.md index fc8b7c4c..2cae4900 100644 --- a/docs/configuration.md +++ b/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