Cokernels in the category of abelian groups

Suppose f:AB is a morphism of abelian groups. Prove that the projection morphism π:BB/im(f) is a cokernel of f.