TITLE: Equivalence of the definitions of "image" in category theory
QUESTION [6 upvotes]: The concept of "image" in Category Theory is, depending on source, defined in two possible ways: Either as a factorization of a morphism, or as the kernel of a cokernel. 
More precisely, let some category with zero morphisms be given. If $f: A \to B$ is a morphism in that category, we can define the image of $f$ via factorization:
$$ A \to I \underset{\operatorname{im}(f)}\hookrightarrow B = f$$
where $I$ is the smallest object with this property (this is the definition that Wikipedia and nLab give)
or as the kernel of the cokernel:
$$ \operatorname{im}(f) = \ker(\operatorname{coker}(f))$$
What I would like to understand is when and why these definitions are equivalent. Thus, my (two-part) question is:

Are these definitions equivalent in general, or only for Abelian categories?
Where can I find a simple proof of the equivalence?

I have seen a (very sketchy) proof in the Abelian case that I did not fully understand, and I could prove that the kernel-cokernel definition gives a factorization for any category with zero morphisms, but not that it is minimal.

REPLY [5 votes]: The two concept aren't always equivalent. For example, in category of groups this is no longer true. In particular, the image of a group homomorphism is the kernel of its cokernel if and only if the image is a normal subgroup of the codomain.
You can prove easily that a kernel is always the kernel of its cokernel.