enhance: fallback option for media proxy

This commit is contained in:
syuilo
2022-12-08 17:16:50 +09:00
parent 2a86942f07
commit 6d46e5cf77
2 changed files with 19 additions and 1 deletions

View File

@@ -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' } : {}),
})}`;
}