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 March 25, 2024 06:13
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;
}
}());