In the 2-topos Cat, the pair of classes of morphisms (essentially surjective and full functors, faithful functors) form a factorization system in a 2-category. This factorization system can also be restricted to the (2,1)-topos Grpd.
For a functor between groupoids, its factorization is through a groupoid which is, up to equivalence, given as follows;
More on this is at infinity-image – Of Functors between groupoids.
(eso+full, faithful)-factorization system