Digital camera photos are often saved as JPEG with an EXIF \"orientation\" tag. To display correctly, images need to be rotated/mirrored depending on which orientation is se
I created a class wrapped in an ES6 module that solves exactly this.
It's 103 lines, no dependencies, and fairly nicely structured and documented, meant to be easy to modify/reuse.
Handles all 8 possible orientations, and is Promise-based.
Here you go, hope this still helps someone: https://gist.github.com/vdavid/3f9b66b60f52204317a4cc0e77097913