I'd prefer an approach that performed the rotation as part of the WebGL shader rather than doing it here.  

This way, each time we rotate we decode and re-encode the image, which means we lose image data and sharpness.  All the other edits can be applied at once to the original image, so there is only one re-encoding that is required.  Rotation adds another re-encoding and loses more data.  If the user rotates multiple times, the image will just keep getting worse.