TITLE: What is the most general category in which isomorphisms theorems holds+
QUESTION [6 upvotes]: The first isomorphism theorem for groups, rings, etc, is:

$G/\text{ker}(f) \simeq im(f)$, for a morphism $f\colon G \rightarrow G'$ in the respective category.

What is the most general category in which we can do this?

REPLY [5 votes]: It turns out to be surprisingly tricky to define the image in an abstract category; the answer mostly depends on what you want the image to be.
The LHS is easier. In any category whatsoever we can ask for the kernel pair of a morphism, which is a "nonlinear" generalization of the kernel. For a morphism $f : X \to Y$ you can think of it intuitively as the equivalence relation on $X$ given by $x_1 \sim x_2$ iff $f(x_1) = f(x_2)$, and that's what it works out to be in familiar concrete examples. Then you can ask for the coequalizer of the kernel pair, which quotients $X$ by this equivalence relation; the result is called the regular coimage $\text{coim}(f)$ of $f$.
There's a dual construction given by taking the equalizer of the cokernel pair and it produces a construction called the regular image $\text{im}(f)$ of $f$. There is always a natural map $\text{coim}(f) \to \text{im}(f)$, which is always both a monomorphism and an epimorphism (sometimes called a bimorphism although personally I don't like this term), but not always an isomorphism. I would say that a usable definition of "the first isomorphism theorem" in a generic category is that this map is an isomorphism.
Here are some examples of how these constructions behave in practice.
Example. In $\text{Set}$ both the regular coimage and regular image are the ordinary image of a function. This is not entirely trivial because they're computed in two different ways.
Example. In an abelian category the regular coimage can be computed as the cokernel of the kernel and the regular image can be computed as the kernel of the cokernel. It's a standard fact about abelian categories that these end up being equivalent, and define the "image," unambiguously, of a morphism in an abelian category.
Example. In $\text{Top}$ the regular coimage of a continuous function $f : X \to Y$ is the set-theoretic image of $f$ topologized as a quotient of $X$, and the regular image is the set-theoretic image of $f$ topologized as a subspace of $Y$. Thus the map $\text{coim}(f) \to \text{im}(f)$ is always a continuous bijection but the topologies may not agree, although they do if $X$ and $Y$ are both compact Hausdorff.
Example. In $\text{Ban}_1$, the category of Banach spaces and linear maps of norm at most $1$ (which has much better categorical properties than the usual $\text{Ban}$), the regular image of a continuous linear map $f : X \to Y$ is the set-theoretic image of $f$ with the quotient norm from $X$, and the regular coimage is the closure of the set-theoretic image of $f$ with the subspace norm from $Y$. So the map $\text{coim}(f) \to \text{im}(f)$ has dense set-theoretic image but may not be surjective and the norms may not agree.