Skip to content

Instantly share code, notes, and snippets.

View SagiMedina's full-sized avatar

Sagi Medina SagiMedina

  • CodiumAI
  • Israel
View GitHub Profile
@SagiMedina
SagiMedina / ImageTools.js
Last active September 7, 2024 04:39
Resize and crop images in the Browser with orientation fix using exif
import EXIF from 'exif-js';
const hasBlobConstructor = typeof (Blob) !== 'undefined' && (function checkBlobConstructor() {
try {
return Boolean(new Blob());
} catch (error) {
return false;
}
}());