Do not transcode images if they meet the size thresholds
This commit is contained in:
parent
9066067aa4
commit
81c57107ce
6 changed files with 89 additions and 10 deletions
|
@ -209,7 +209,11 @@ export async function autoOrientJPEG(
|
|||
attachment.data,
|
||||
attachment.contentType
|
||||
);
|
||||
const xcodedDataBlob = await scaleImageToLevel(dataBlob, isIncoming);
|
||||
const { blob: xcodedDataBlob } = await scaleImageToLevel(
|
||||
dataBlob,
|
||||
attachment.contentType,
|
||||
isIncoming
|
||||
);
|
||||
const xcodedDataArrayBuffer = await blobToArrayBuffer(xcodedDataBlob);
|
||||
|
||||
// IMPORTANT: We overwrite the existing `data` `ArrayBuffer` losing the original
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue