summaryrefslogtreecommitdiffstats
path: root/custom
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2021-12-15 18:18:38 -0800
committerGitHub <noreply@github.com>2021-12-16 10:18:38 +0800
commitcc129d2ca22100fe9c28106d9bc302678651f339 (patch)
treea4fb2c926d501230267d03b09d6a9518a4e54c32 /custom
parente78ee73d712d8d248b9a3a552187d06632000331 (diff)
downloadgitea-cc129d2ca22100fe9c28106d9bc302678651f339.tar.gz
gitea-cc129d2ca22100fe9c28106d9bc302678651f339.zip
Make AvatarRenderedSizeFactor configurable and set it to 3 (#17951)
Save a bit of bandwidth by only requesting 3-times the rendered avatar size. Factor 4 is only really beneficial on a handful of mobile phones and I don't think they are the primary device we design for. Configurability contributed by zeripath. Fixes: https://github.com/go-gitea/gitea/pull/17422 Fixes: https://github.com/go-gitea/gitea/issues/16287 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'custom')
-rw-r--r--custom/conf/app.example.ini4
1 files changed, 4 insertions, 0 deletions
diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini
index 2ade907993..1d19a34380 100644
--- a/custom/conf/app.example.ini
+++ b/custom/conf/app.example.ini
@@ -1587,6 +1587,10 @@ PATH =
;AVATAR_MAX_WIDTH = 4096
;AVATAR_MAX_HEIGHT = 3072
;;
+;; The multiplication factor for rendered avatar images.
+;; Larger values result in finer rendering on HiDPI devices.
+;AVATAR_RENDERED_SIZE_FACTOR = 3
+;;
;; Maximum allowed file size for uploaded avatars.
;; This is to limit the amount of RAM used when resizing the image.
;AVATAR_MAX_FILE_SIZE = 1048576