Suppose $R$ is a commutative ring with identity and let $I$ be a nonzero proper ideal of $R$. Prove that if $f: R \to k$ is a ring map ($k$ is field) and $f(x)\in\left<f(I)\right>$, then $x\in\mathrm{rad}(I)$.
I believe this is not correct unless $f$ is surjective.
My attempted. I assumed that $f$ is surjective.
$f(x)\in\left<f(I)\right>$, and we will get $x\in\mathrm{rad}(I)$ since $I\subseteq\mathrm{rad}(I)$.
My question is this question can be true without assumption that $f$ must be surjective, if not, could give a counterexample. By the way, ring map is homomorphism.
Any help will appreciated .