Closed mwc2016 closed 1 year ago
like the 'lastModified' date?
like the 'lastModified' date?
Yup, like below information
added option preserveExif
in v2.0.1 to enabled this feature
e.g.,
const options = {
maxSizeMB: 1,
maxWidthOrHeight: 1920,
useWebWorker: true,
preserveExif: true,
}
try {
const compressedFile = await imageCompression(imageFile, options);
console.log('compressedFile instanceof Blob', compressedFile instanceof Blob); // true
console.log(`compressedFile size ${compressedFile.size / 1024 / 1024} MB`); // smaller than maxSizeMB
await uploadToServer(compressedFile); // write your own logic
} catch (error) {
console.log(error);
}
Might I know that how to keep the metadata during compression image