Suppose $f\colon A\longrightarrow B$ is a cover in a category (i.e. a morphism which does not factor through any proper subobject) and let $g\colon B\longrightarrow C$ a morphism with image $D\rightarrowtail C$. I have been asked to prove or disprove that then the image of $g\circ f$ coincides with the image of $g$. I think this should be true but I am not able to prove it.
Consider the category with two objects $I$ and $T,$ with all hom-sets singletons except for $T$ which has three self-maps $1_T,f,f^2$ obeying $f^2=f^3.$ The composite $T\to I\to T$ is $f^2:T\to T.$ (If it helps: this category is the Karoubi envelope of the monoid $T=\langle f\mid f^2=f^3\rangle.$) Take $f=g.$ They're both extremal epi, but the composite $f^2$ factors through $I\rightarrowtail T.$