A while ago I was interested in categorical image of composition of morphisms in abelian categories, see this post. I learnt that $\text{Im}(gf)=\text{Im}(g i)$ where $i$ is the canonical monomorphism gotten by factorizing $f$ in the abelian category. Recently, I had to deal with the same thing but with kernels.
Context 1: Recall that abelian categories have all kernels. The categorical kernel of a morphism $f$ is the equalizer of $f$ and the zero morphism (which exists as abelian categories contain zero objects).
Context 2: In the category of sets, for a composable pair of morphisms $f,g$ we know $\ker(gf)=f^{-1}(\ker(g))$, ie the preimage of $\ker(g)$ along $f$.
Question: Is there a categorical version of this for arbitrary abelian categories?
My thoughts so far: Let $A\xrightarrow{f}B\xrightarrow{g}C$ be a composable pair of morphisms in an arbitrary abelian category. Let $k:\ker(g)\to B$ be the kernel map of $g$. I think I need to lift this map along $f$ to get a map from $\ker(g)\to A$. It may be (I am not at all sure) possible to take the kernel of this map to be $\ker(gf)$ using the universal property of kernels.
Any suggestions would be greatly helpful :))