1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-01 15:05:32 +02:00

APNG support

This commit is contained in:
syuilo
2019-07-04 14:45:28 +09:00
parent 5e7a4e4752
commit ead5a6a258
7 changed files with 22 additions and 8 deletions

View File

@@ -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 = {