aboutsummaryrefslogtreecommitdiffstats
path: root/modules/base
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2016-06-27 12:12:30 +0200
committer无闻 <u@gogs.io>2016-06-27 18:12:30 +0800
commit8a248696e94e2756dee3f2a000fe8609a0c2111c (patch)
treee3444c483de9ec6045528185f2f58b9cbe322300 /modules/base
parent8b35c194ecf5ff44a0b80595a5631e76e14fd0fb (diff)
downloadgitea-8a248696e94e2756dee3f2a000fe8609a0c2111c.tar.gz
gitea-8a248696e94e2756dee3f2a000fe8609a0c2111c.zip
Use a gopher as default avatar (rather than the gravatar logo) (#3208)
Also changes the avatar from a jpeg to a png, to allow for transparent background. The indexed png is also smaller in size. Note that at the moment the default avatar is only used when the user requested a custom avatar and the custom avatar file is not found (should never happen). In the future the default avatar could be used as a default return when by-mail avatar lookups fail too (both gravatar and libravatar support passing a default)
Diffstat (limited to 'modules/base')
-rw-r--r--modules/base/tool.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go
index 22a90daff7..f045cb2270 100644
--- a/modules/base/tool.go
+++ b/modules/base/tool.go
@@ -207,7 +207,7 @@ func HashEmail(email string) string {
// AvatarLink returns avatar link by given email.
func AvatarLink(email string) string {
if setting.DisableGravatar || setting.OfflineMode {
- return setting.AppSubUrl + "/img/avatar_default.jpg"
+ return setting.AppSubUrl + "/img/avatar_default.png"
}
return setting.GravatarSource + HashEmail(email)