diff --git a/modules/templates/util_avatar.go b/modules/templates/util_avatar.go index 524c64d0b6..f2c3e8502b 100644 --- a/modules/templates/util_avatar.go +++ b/modules/templates/util_avatar.go @@ -4,6 +4,7 @@ package templates import ( + group_model "code.gitea.io/gitea/models/group" "context" "html" "html/template" @@ -55,6 +56,11 @@ func (au *AvatarUtils) Avatar(item any, others ...any) template.HTML { if src != "" { return AvatarHTML(src, size, class, t.AsUser().DisplayName()) } + case *group_model.Group: + src := t.AvatarLinkWithSize(size * setting.Avatar.RenderedSizeFactor) + if src != "" { + return AvatarHTML(src, size, class, t.Name) + } } return AvatarHTML(avatars.DefaultAvatarLink(), size, class, "")