diff options
author | silverwind <me@silverwind.io> | 2021-12-15 18:18:38 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-16 10:18:38 +0800 |
commit | cc129d2ca22100fe9c28106d9bc302678651f339 (patch) | |
tree | a4fb2c926d501230267d03b09d6a9518a4e54c32 /models/avatars | |
parent | e78ee73d712d8d248b9a3a552187d06632000331 (diff) | |
download | gitea-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 'models/avatars')
-rw-r--r-- | models/avatars/avatar.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/models/avatars/avatar.go b/models/avatars/avatar.go index da63dfd106..7206a8ae90 100644 --- a/models/avatars/avatar.go +++ b/models/avatars/avatar.go @@ -21,9 +21,6 @@ import ( // DefaultAvatarPixelSize is the default size in pixels of a rendered avatar const DefaultAvatarPixelSize = 28 -// AvatarRenderedSizeFactor is the factor by which the default size is increased for finer rendering -const AvatarRenderedSizeFactor = 4 - // EmailHash represents a pre-generated hash map (mainly used by LibravatarURL, it queries email server's DNS records) type EmailHash struct { Hash string `xorm:"pk varchar(32)"` |