This is a theorem in Willard's text, Theorem 12.14, p81, which states:
$f$ maps $X$ into $Y$ and $\mathcal{F}$ is an ultrafilter on $X$, then $f(\mathcal{F})$ is an ultrafilter on $Y$.
We define $f(\mathcal{F})$ to be filter with $\{ f(F) : F \in \mathcal {F} \}$ as filter base.
I just wanted to check if this is right, because my proof did not use injectivity rather surjectivity.
Proof: Suppose false: there is filter $\mathcal{G}$ such that $f(\mathcal{F}) \subseteq \mathcal{G} $ and $G' \in \mathcal{G} \setminus f(\mathcal{F})$. Consider filter on $X$ with filter base $\{ f^{-1}(G) : G \in \mathcal{G} \}$, then this is a strictly finer filter of $\mathcal{F}$, if $f$ is onto, with $f^{-1}(G')$ nonempty.