© 2016, American Physical Society. All rights reserved. The need to operate an rf-gun-based electron photoinjector with a beam emitted away from the cathode center can occur under various circumstances. First, in some cases the cathode can be affected by ion back-bombardment that progressively reduces the quantum efficiency (QE) in its center, making off-axis operation mandatory; second, in some cases the drive laser intensity can be sufficiently high to generate QE depletion in the cathode area illuminated by the laser, forcing off-axis operation; last, in cathodes with nonuniform QE distribution it could be convenient to operate off axis to exploit a better QE. However, operation in this mode may lead to growth of the projected transverse beam emittances due to correlations between the transverse and longitudinal degrees of freedom that are introduced within the gun and downstream rf cavities. A strategy is described to mitigate this emittance growth by allowing the beam to propagate along a carefully tuned off-axis trajectory in downstream rf cavities to remove the time-dependent rf kicks introduced in the gun. Along this trajectory, short range wakefields do not degrade the emittance, and long range wakefields degrade the emittance for very high repetition rate only.