$f(X) = \{y \in Y | \ there \ exists \ x \in X : f(x) = y \}$.
Assume that $|X| = n$. It follows there exists bijection $f : X \rightarrow [n]$. For each $x \in X$ we can choose element of the fibre above it such that $\phi(x) = y$ so that $f(x) = y$. Construct $\phi : f(X) \rightarrow X$. Therefore it follows $f \circ \phi : f(X) \rightarrow [n]$ that is injective. Through identification $f(X) \subset [n]$. I have proven the fact that for subsets $Y \subset X$, we have $|Y| \leq X$ by induction. It follows $|f(X)| \leq [n] = |X|$.