parent
9855405b89
commit
48e8ee440b
2 changed files with 36 additions and 13 deletions
|
@ -21,7 +21,7 @@ export async function proxyMedia(ctx: Koa.Context) {
|
|||
|
||||
let image: IImage;
|
||||
|
||||
if ('static' in ctx.query && ['image/png', 'image/gif', 'image/apng', 'image/vnd.mozilla.apng'].includes(mime)) {
|
||||
if ('static' in ctx.query && ['image/png', 'image/gif', 'image/apng', 'image/vnd.mozilla.apng', 'image/webp'].includes(mime)) {
|
||||
image = await convertToPng(path, 498, 280);
|
||||
} else if ('preview' in ctx.query && ['image/jpeg', 'image/png', 'image/gif', 'image/apng', 'image/vnd.mozilla.apng'].includes(mime)) {
|
||||
image = await convertToJpeg(path, 200, 200);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue