mirror of
https://github.com/element-hq/element-call.git
synced 2026-10-29 09:52:58 +00:00
Merge pull request #709 from robintown/crisp-avatars
Fix blurry avatars
This commit is contained in:
1 file changed
+3
-1
+3
-1
@@ -309,5 +309,7 @@ export function getAvatarUrl(
|
||||
): string {
|
||||
const width = Math.floor(avatarSize * window.devicePixelRatio);
|
||||
const height = Math.floor(avatarSize * window.devicePixelRatio);
|
||||
return mxcUrl && client.mxcUrlToHttp(mxcUrl, width, height, "crop");
|
||||
// scale is more suitable for larger sizes
|
||||
const resizeMethod = avatarSize <= 96 ? "crop" : "scale";
|
||||
return mxcUrl && client.mxcUrlToHttp(mxcUrl, width, height, resizeMethod)!;
|
||||
}
|
||||
Reference in new issue
Block a user