Skip to content

Conversation

@nickvergessen
Copy link
Member

Currently avatars are requested in lots of different sizes. This means they can not be properly cached by clients and also the server needs to generate them in multiple different versions.
To save requests we from now on only allow 64 and 512 as avatar size.

cc @tobiasKaminsky maybe you can take this into the client team and adjust the requests there as well. The returned images will be 64 and 512 with this PR, but you can increase your own cache hits if you don't request /avatar/tobi/256 which will return the 512 image anyway

@szaimen szaimen added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 4, 2022
@PVince81
Copy link
Member

PVince81 commented Feb 4, 2022

integration tests for avatar needs adjusting as well @nickvergessen

@szaimen szaimen added 2. developing Work in progress and removed 4. to release Ready to be released and/or waiting for tests to finish labels Feb 4, 2022
@nickvergessen nickvergessen force-pushed the techdebt/noid/fixed-avatar-sizes branch from a419e16 to 6dd60b6 Compare February 7, 2022 15:48
@nickvergessen nickvergessen added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Feb 7, 2022
@nickvergessen nickvergessen requested a review from szaimen February 7, 2022 15:48
@nickvergessen
Copy link
Member Author

Pushed and also enforcing size on guest avatars now

@PVince81
Copy link
Member

backport ?

@nickvergessen
Copy link
Member Author

Might have potential to break various apps, do not recommend.
Apps themselves can already change to those sizes to help reducing the impact. Vue library 5.0 also has those sizes fixed. So it will improve, but i wouldn't recommend backporting the breaking change

mahibi added a commit to nextcloud/talk-android that referenced this pull request Mar 2, 2022
necessary because of nextcloud/server#31010

known issue: avatars in chat messages are too big atm

Signed-off-by: Marcel Hibbe <[email protected]>
mahibi added a commit to nextcloud/talk-android that referenced this pull request Mar 2, 2022
necessary because of nextcloud/server#31010

known issue: avatars in chat messages are too big atm

Signed-off-by: Marcel Hibbe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish performance 🚀 technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants