Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
new Promise((resolve, reject) =>
loadImage(
props.file,
(canvas, meta) => {
if (canvas.type === 'error') reject(canvas)
resolve({
...props,
small: canvas.toDataURL(),
...extractExifTags(meta.exif && meta.exif.getAll()),
})
},
{ maxHeight: THUMB_SIZE, maxWidth: THUMB_SIZE, canvas: true, meta: true },
),
)