From 73eacbe46ea4eb88d5b569f591bf756d16b64e13 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 26 Oct 2023 23:45:58 +0200 Subject: [PATCH 1/2] fix: image --- apps/pink/src/components/JoinCommunity.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/pink/src/components/JoinCommunity.svelte b/apps/pink/src/components/JoinCommunity.svelte index 15780f6a67..ee28612688 100644 --- a/apps/pink/src/components/JoinCommunity.svelte +++ b/apps/pink/src/components/JoinCommunity.svelte @@ -22,7 +22,13 @@ }); function getAvatar(user: User) { - return `https://github.com/${user.username}.png`; + const url = new URL('https://cloud.appwrite.io/v1/image'); + url.searchParams.set('project', 'console'); + url.searchParams.set('width', '100'); + url.searchParams.set('height', '100'); + url.searchParams.set('url', `https://github.com/${user.username}.png`); + + return url.toString(); } function getUrl(user: User) { From fb898fdf7428128b7013d5852bfdbe21d2a937c1 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 26 Oct 2023 23:47:43 +0200 Subject: [PATCH 2/2] fix: url --- apps/pink/src/components/JoinCommunity.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/pink/src/components/JoinCommunity.svelte b/apps/pink/src/components/JoinCommunity.svelte index ee28612688..48af5a0921 100644 --- a/apps/pink/src/components/JoinCommunity.svelte +++ b/apps/pink/src/components/JoinCommunity.svelte @@ -22,7 +22,7 @@ }); function getAvatar(user: User) { - const url = new URL('https://cloud.appwrite.io/v1/image'); + const url = new URL('https://cloud.appwrite.io/v1/avatars/image'); url.searchParams.set('project', 'console'); url.searchParams.set('width', '100'); url.searchParams.set('height', '100');