1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-01 03:48:24 +00:00

Fix the shaking issue for avatars with an aspect ratio that is not 1:1.

This commit is contained in:
Kerwin Bryant
2024-11-22 00:51:18 +00:00
parent 9bf821ae6c
commit cfde7feec6
3 changed files with 1 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ func AvatarHTML(src string, size int, class, name string) template.HTML {
name = "avatar"
}
return template.HTML(`<img loading="lazy" class="` + class + `" src="` + src + `" title="` + html.EscapeString(name) + `" width="` + sizeStr + `" height="` + sizeStr + `"/>`)
return template.HTML(`<img loading="lazy" class="` + class + `" src="` + src + `" title="` + html.EscapeString(name) + `" height="` + sizeStr + `"/>`)
}
// Avatar renders user avatars. args: user, size (int), class (string)