Backport #32051 by @hiifong
Before:
https://github.com/user-attachments/assets/
7b1681ba-4781-432a-ae20-
c07e94c1dbb6
After:
https://github.com/user-attachments/assets/
5154e160-e22c-460e-b0d9-
28768486c178
Co-authored-by: hiifong <i@hiif.ong>
name = "avatar"
}
- return template.HTML(`<img 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) + `" width="` + sizeStr + `" height="` + sizeStr + `"/>`)
}
// Avatar renders user avatars. args: user, size (int), class (string)