mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-19 05:55:34 +09:00
fix(media-proxy): serve and request images on one size ladder (#1833)
This commit is contained in:
1 parent
051985b767
commit
171dc7e5b7
4 files changed
+190
-39
No files matched your search
@@ -33,9 +33,13 @@ const MEDIA_PROXY_IMAGE_SIZE_QUERY_VALUES = [
|
||||
'3072',
|
||||
'4096',
|
||||
'8192',
|
||||
'12000',
|
||||
'16384',
|
||||
] as const;
|
||||
|
||||
export type MediaProxyImageSizeQueryValue = (typeof MEDIA_PROXY_IMAGE_SIZE_QUERY_VALUES)[number];
|
||||
type ParseNumericLiteral<T extends string> = T extends `${infer N extends number}` ? N : never;
|
||||
export type MediaProxyImageSize = ParseNumericLiteral<MediaProxyImageSizeQueryValue>;
|
||||
|
||||
export const MEDIA_PROXY_IMAGE_SIZES: ReadonlyArray<MediaProxyImageSize> = MEDIA_PROXY_IMAGE_SIZE_QUERY_VALUES.map(
|
||||
(value) => Number(value) as MediaProxyImageSize,
|
||||
);
|
||||
Reference in new issue
Block a user