Assuming you're doing this via CSS transforms, it should be possible to do something like:
```
transform: matrix(/* EXIF orientation */) rotation(...) scale(...);
```