Just create a throttle and throttleIndex so that your rotateImage function only actually fires every X times it's called. To make it slower, increase the throttle; to make it faster, decrease it.
var throttle = 5;
var throttleIndex = 0;
function rotateimage(e) {
throttleIndex += 1;
if (throttleIndex >= throttle) {
throttleIndex = 0;
...
}
}