@@ -26,6 +26,8 @@ export class FrameNormalizer {
|
||||
});
|
||||
});
|
||||
const info = await stat(output);
|
||||
return { ...metadata, path: output, bytes: info.size, maxLongEdge: this.maxLongEdge, mime: 'image/webp' };
|
||||
const ext = path.extname(output).toLowerCase();
|
||||
const mime = metadata.mime || (ext === '.png' ? 'image/png' : ext === '.jpg' || ext === '.jpeg' ? 'image/jpeg' : 'image/webp');
|
||||
return { ...metadata, path: output, bytes: info.size, maxLongEdge: this.maxLongEdge, mime };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user