go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.98k stars 5.48k forks source link

how to generate avatar automatically? #15040

Closed nkbai closed 3 years ago

nkbai commented 3 years ago

the older version support this feature: generate avatar for every user from it's name, but when I use the latest version, This feature is missing and can not automatically generate an avatar based on my initials. For example, generate a picture by Bai with three letters.

How Do I get this feature back so I can clearly identify users without having to upload their avatar.

We are a small group of only a few people,

image

6543 commented 3 years ago

this should not happen ...

... can you provide us some log's? and do new created users have this issue too?

garfeng commented 3 years ago

I don't known why, but if you edit the app.ini as the following, the feature will be activated:

[picture]
DISABLE_GRAVATAR        = false

# maybe by default https://cn.gravatar.com/
GRAVATAR_SOURCE = https://www.libravatar.org/avatar/

ENABLE_FEDERATED_AVATAR = true

Then gittea will generate avatar automatically.

Maybe the reason is:

There are some web server can generate avatar automatically:

  1. Gavator(https://cn.gravatar.com/) blocked in China
  2. Federated Avatars(https://cdn.libravatar.org/) can be accessed in China
  3. ...

and gitea uses Gavator by default.


默认用的可能是 gavatar ,被墙了,换一个就可以。

lunny commented 3 years ago

I think this is your network problem. Please check chrome devtools network to confirm that.

nkbai commented 3 years ago

多谢,确实是因为被墙了的原因,但是生成的头像是随机的,我记得早期的版本生成的头像是根据名字来的,比如我的头像可能是一个很大的N

lunny commented 3 years ago

Hm, that feature maybe dropped?