summaryrefslogtreecommitdiff
path: root/packages/client/src/scripts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-12-08 17:16:50 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-12-08 17:16:50 +0900
commit6d46e5cf7759e29abcfc63dea81e325c2870acea (patch)
treea34e59435eca29320c51452d2ebd0f6240351ef0 /packages/client/src/scripts
parentfix(client): use proxied image for instance icon (diff)
downloadsharkey-6d46e5cf7759e29abcfc63dea81e325c2870acea.tar.gz
sharkey-6d46e5cf7759e29abcfc63dea81e325c2870acea.tar.bz2
sharkey-6d46e5cf7759e29abcfc63dea81e325c2870acea.zip
enhance: fallback option for media proxy
Diffstat (limited to 'packages/client/src/scripts')
-rw-r--r--packages/client/src/scripts/media-proxy.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/client/src/scripts/media-proxy.ts b/packages/client/src/scripts/media-proxy.ts
index 506cb78291..aaf7f9e610 100644
--- a/packages/client/src/scripts/media-proxy.ts
+++ b/packages/client/src/scripts/media-proxy.ts
@@ -4,7 +4,8 @@ import { url } from '@/config';
export function getProxiedImageUrl(imageUrl: string, type?: 'preview'): string {
return `${url}/proxy/image.webp?${query({
url: imageUrl,
- ...(type ? { [type]: "1" } : {}),
+ fallback: '1',
+ ...(type ? { [type]: '1' } : {}),
})}`;
}