From ead5a6a258261f2294aad770ccc1ff01d02ed832 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 4 Jul 2019 14:45:28 +0900 Subject: APNG support --- src/server/proxy/proxy-media.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server') diff --git a/src/server/proxy/proxy-media.ts b/src/server/proxy/proxy-media.ts index 4535a0fb5d..eadfab54a3 100644 --- a/src/server/proxy/proxy-media.ts +++ b/src/server/proxy/proxy-media.ts @@ -21,9 +21,9 @@ export async function proxyMedia(ctx: Koa.BaseContext) { let image: IImage; - if ('static' in ctx.query && ['image/png', 'image/gif'].includes(type)) { + if ('static' in ctx.query && ['image/png', 'image/gif', 'image/apng', 'image/vnd.mozilla.apng'].includes(type)) { image = await convertToPng(path, 498, 280); - } else if ('preview' in ctx.query && ['image/jpeg', 'image/png', 'image/gif'].includes(type)) { + } else if ('preview' in ctx.query && ['image/jpeg', 'image/png', 'image/gif', 'image/apng', 'image/vnd.mozilla.apng'].includes(type)) { image = await convertToJpeg(path, 200, 200); } else { image = { -- cgit v1.2.3-freya