Request avatars of the appropriate size #301
Labels
a-api
Implementing specific parts of the Zulip server API
beta feedback
Things beta users have specifically asked for
Milestone
With #195 fixed with PR #287, we now have a user-profile screen! 🎉
I noticed that on many profiles on CZO, the avatar is more blurry than on the corresponding screen in
zulip-mobile
:This is because we don't yet have special logic for requesting a larger image when we need one. This issue is for adding such logic.
In
zulip-mobile
, we made anAvatarURL
class with aget
method that gives you a URL for an image of the specified size in physical pixels (or at least the best possible approximation).AvatarURL
has three subclasses that each implementget
very differently.On CZO in
#api documentation
, I've summarized zulip-mobile's logic for determining a URL for any given size in physical pixels. I'm hoping the API doc can start specifying that logic, and we can use the new documentation for zulip-flutter's implementation.To convert a logical-pixel value to a physical-pixel value, we'll want to multiply by the device pixel ratio. As in zulip-mobile:
I think a solution will likely have lots of interactions with #254 and #255, so the best approach might be to consider these three issues together.
Related: #254
Related: #255
The text was updated successfully, but these errors were encountered: