Let $\mathcal{A}$ be an additive category with all kernels and cokernels and $f:A\to B$ a morphism. If $e:B\to \text{coker}(f)$ is the canonical epimorphism, define $\text{im}(f):=\ker(e)$, with a canonical monomorphism $i:\text{im}(f)\to B$. Prove that:
$1)$ There is a unique $\pi:A\to\text{im}(f)$ such that $i\circ\pi=f$
$2)$ If there is a monomorphism $i':C\to B$ and a morphism $\pi':A\to C$ such that $i'\circ\pi'=f$, then there is a unique morphism $\mu:\text{im}(f)\to C$ such that $\mu\circ\pi=\pi'$ and $i'\circ\mu=i$.
For part $1)$, I used the fact that $e\circ f=0$ (by definition of $\text{coker(f)}$), so by the universal property of $\ker(e)$, there is a unique $\pi$ such that $i\circ\pi=f$
For $2)$, I've shown that if there is another $\mu'$ with these properties, then $i'\circ \mu=i=i'\circ \mu'$ and, since $i'$ is a monomorphism, then $\mu'=\mu$, so $\mu$ is unique. Furthermore, assuming $i'\circ\mu=i$, we get $i'\circ\mu\circ\pi=i\circ\pi=f=i'\circ\pi'$ and, since $i'$ is a monomorphism, $\mu\circ\pi=\pi'$, which means we only need to find $\mu$ with $i'\circ\mu=i$. Here is where I'm stuck, because I don't know how to come up with an arrow $\textit{leaving }\text{im}(f)$, since the universal property of $\ker(e)$ can only give an arrow $\textit{arriving}$ at it.
This is not true in general. For instance, let $\mathcal{A}$ be the category of torsion-free abelian groups. This is an additive category with kernels and cokernels (to form a cokernel, first take the cokernel in $Ab$ and then mod out the torsion subgroup). Now consider the map $f:\mathbb{Z}\to\mathbb{Z}$ given by multiplication by $2$. The cokernel of $f$ is $0$, so the image of $f$ is the identity $\mathbb{Z}\to\mathbb{Z}$. But taking $i'=f$ and $\pi'=1$, $i'$ is a monomorphism, $i'\circ\pi'=f$, but $i=1$ does not factor through $i'$.