-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User avatar in profile page changed from s=290 to s=580 while rendered at s=128 anyway #16287
Comments
See #15453 |
That ticket shows that passing a size is what changed, but doesn't explain why we're passing a size of 580 when rendering the image at 128, is that an UI issue which went unnoticed before ? |
It got worst, now the avatar image is requested at size 1160 ! I noted that models/avatars/avatar.go has a |
290 constant is still present in
What was the AvatarRenderedSizeFactor introduced for ? It looks like be745be doubled it from a factor of 2 to a factor of 4 to get better avatars for Hi-DPI displays but, shouldn't all of this be decided by the frontend code and based on actual displays ? \cc @techknowlogick @zeripath ref #15941 |
Although the requested size looks like But, I believe we should make the avatar size problem correct. |
The image is not big because my avatar service is being nice and refusing to serve such a big image, but what Gitea requests should match what it actually will want to render on the screen. The generated HTML looks like this:
Doesn't make sense, right ? It will render at 290x290 no matter what the |
The culprit seems to be the Avatar helper in modules/templates/helper.go which applies the RenderedSizeFactor to the size requested by the template |
Save a bit of bandwidth by only requesting 3-times the rendered avatar size. Factor 4 is only really beneficial on a handful of mobile phones and I don't think they are the primary device we design for. Fixes: go-gitea#17422 Fixes: go-gitea#16287
Save a bit of bandwidth by only requesting 3-times the rendered avatar size. Factor 4 is only really beneficial on a handful of mobile phones and I don't think they are the primary device we design for. Configurability contributed by zeripath. Fixes: go-gitea#17422 Fixes: go-gitea#16287
Save a bit of bandwidth by only requesting 3-times the rendered avatar size. Factor 4 is only really beneficial on a handful of mobile phones and I don't think they are the primary device we design for. Configurability contributed by zeripath. Fixes: #17422 Fixes: #16287 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Unfortunately the default size factor of 3 still breaks my avatar: https://try.gitea.io/strk (is requested at 870x870 |
…17951) Save a bit of bandwidth by only requesting 3-times the rendered avatar size. Factor 4 is only really beneficial on a handful of mobile phones and I don't think they are the primary device we design for. Configurability contributed by zeripath. Fixes: go-gitea#17422 Fixes: go-gitea#16287 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Gitea 1.14.3 is requesting Libravatar avatar images with size 580 in profile page while rendering them at 128x128.
Older versino 1.12.3 was requesting a size of 290 instead.
I think it would make sense to request s=128 instead, to reduce the download time
The text was updated successfully, but these errors were encountered: