Scheme theoretic image Let $f : Z \rightarrow X$ be a morphism of schemes. I want to get a unique closed subsheme $Y$ of $X$ with the following propertie : the morphism $f$ factor through $Y$ and if $Y'$ is any other closed subscheme of $X$ through which $f$ factors, then $Y \rightarrow X$ factor through $Y'$ also.
I approached in the following manner. Let $\mathfrak{I}$ be the kernel of the morphism of scheme $O_X \rightarrow f_*O_Z$. I want to claim that $Y = O_X/ \mathfrak{I}$. To show that $Y$ is a scheme I need to show that $\mathfrak{I}$ is quasicoherent ideal. For this I may assume $X$ is affine as it is a local property. Is my claim correct? If not what is the example where $\mathfrak{I}$ fails to be quasi coherent? how to prove the statement?
 A: In complete generality the ideal $\mathcal I$ won't be quasi-coherent.  If $f$ is quasi-compact and quasi-separated, then $f_*$ of any quasi-coherent sheaf is quasi-coherent (a simple general fact), and so $\mathcal I$, being the kernel of the morphism $\mathcal O_X \to f_*\mathcal O_Z$, is quasi-coherent.
Actually, if $f$ is quasi-compact, this already suffices to show that $\mathcal I$ is quasi-coherent.  To see this, we can work locally on the target, as you note, and hence assume that $X$ is affine.  Then by the definition of $f$ being quasi-compact, we may cover $Z$ by finitely many open affines $U_i$.  Let $Z'$ denote the disjoint union of the $U_i$; then $Z'$ is affine, and we have a composite map $f':Z' \to Z \to X$.  It is easy to check that the kernel $\mathcal I$ for $f$ and the kernel $\mathcal I'$ for $f'$ coincide, so we reduce to checking quasi-coherence for the map $f'$, which is both quasi-compact and quasi-coherent (indeed, it is just a map of affine schemes, and we are in the context of Darius Math's answer).

Also:
If $Z$ is reduced, then we can see that $\mathcal I$ is just the ideal sheaf
of the closure of the image of $f$, given its induced reduced structure.
So to get a counterexample to quasi-coherence, we need to consider a non-quasi-compact $f$ with non-reduced source.
Here is one:
$Z =$ disjoint union over $n \geq 1$ of Spec $k[t]/(t^n)$,
$X = \mathbb A^1$ Spec $k[t]$, and $Z \to X$ given by the obvious closed immersions on
each connected component of $Z$.
The sheaf $\mathcal I$ coincides with the structure sheaf on the complement of the origin in $\mathbb A^1$, but has vanishing stalk at the origin.

If you want a written account of all this, one place is Ravi Vakil's book.
A: Your answer is correct. Just think of a morphism of affine schemes. if $f:SpecA\rightarrow SpecB$ is such a morphism then it induces $f^{*}:B\rightarrow A$ and this morphism completely determines $f$. Now the image of $f$ can be thought of as $Spec\frac{B}{I}$, where $I=Kerf^{*}$. This is exactly what you wrote in the above.   
