mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 12:03:25 -04:00
#150 [user] bigger avatar sizes
This commit is contained in:
parent
c275e1a982
commit
f3c2420584
@ -78,11 +78,11 @@ export const makeId = (length, characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi
|
||||
return result;
|
||||
}
|
||||
|
||||
export const fallbackAvatar = (user, size = 128) => {
|
||||
export const fallbackAvatar = (user, size = 240) => {
|
||||
return `https://avi.avris.it/${size}/${Base64.encode(user.username).replace(/\+/g, '-').replace(/\//g, '_')}.png`;
|
||||
}
|
||||
|
||||
export const gravatar = (user, size = 128) => {
|
||||
export const gravatar = (user, size = 240) => {
|
||||
return `https://www.gravatar.com/avatar/${user.emailHash || md5(user.email)}?d=${encodeURIComponent(fallbackAvatar(user, size))}&s=${size}`;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user