Send size to /avatars if requested#15459
Conversation
If an avatar is requested in a particular size ensure that /avatars also gets the size request Fix go-gitea#15453 Signed-off-by: Andrew Thornton <art27@cantab.net>
| return DefaultAvatarLink() | ||
| } | ||
| if size > 0 { | ||
| return setting.AppSubURL + "/avatars/" + u.Avatar + "?size=" + strconv.Itoa(size) |
There was a problem hiding this comment.
What does the size parameter do?
There was a problem hiding this comment.
nothing right now - but we should probably keep sending it for future options
|
I think we should request higher resolution from gravatar, like requested image size times 2 like it is done for other images as well. Or maybe just hardcode to 580 which is enough for all UI use cases. https://secure.gravatar.com/avatar/f403e3d7796b4258b34481722014f370?d=identicon vs https://secure.gravatar.com/avatar/f403e3d7796b4258b34481722014f370?d=identicon&s=580 Or am I misunderstanding and this PR already does this? |
|
This PR means that if you request a size that size will get passed down to gravatar. |
silverwind
left a comment
There was a problem hiding this comment.
Can confirm this fixes the issue with such a configuration:
[picture]
DISABLE_GRAVATAR = false
GRAVATAR_SOURCE = gravatar
ENABLE_FEDERATED_AVATAR = true
|
🚀 |
Backport go-gitea#15459 If an avatar is requested in a particular size ensure that /avatars also gets the size request Fix go-gitea#15453 Signed-off-by: Andrew Thornton <art27@cantab.net>
If an avatar is requested in a particular size ensure that /avatars also gets the
size request
Fix #15453
Signed-off-by: Andrew Thornton art27@cantab.net