1.0.1 • Published 6 years ago
image-orientation-js v1.0.1
Image Orientation Js
JS Client-Side Exif Orientation: Rotate and Mirror JPEG Images
npm install image-orientation-js
yarn add image-orientation-js
Examples
import getNewFile from 'image-orientation-js'
async function fixOrientation() {
const uploads = document.querySelector('input').files
for (const file of uploads) {
const converted = await getNewFile(file)
const url = URL.createObjectURL(converted)
document.querySelector('img').src = url
}
}