Let $f:X\to Y$ be some function and $S\subseteq X$ a subset of its domain. It is clear that the image set $f(S)$ exists, as
$$f(S):=\{f(x)\mid x\in S\}=\{y\mid \exists x\in S(f(x)=y)\},$$
and for each $x\in S$, there is at most one $y$ for which $\exists x\in S(f(x)=y)$ holds. Thus, by the axiom of replacement, this set $f(S)$ exists so that $$z\in f(S)=\{y\mid \exists x\in S(f(x)=y)\}\iff (z\in S \land\exists x\in S(f(x)=z)).$$ Is it possible to deduce the existance of $f(S)$ from the axiom of specification? (because the page on which this axiom appears in my book is not available in the google preview, I will include it here):
Axiom. Let $A$ be a set and $P(x)$ some property pertaining to $x\in A$. Then there exists a set $\{x\in A\mid P(x)\}$ such that for any object $y$, $$y\in\{x\in A\mid P(x)\}\iff (y\in A\land P(x))$$
Following the wikipedia entry on the axiom schema of specification (here) where we use $f$ and $S$ as unbound parameters, we can write
$$f[S] = \{ y \in Y: \exists s: s \in S \land y=f(s) \}$$
so we use $\phi(S,f,y) = (\exists s \in S: (s \in S) \land y = f(s))$ as the formula. The subformula $y=f(s)$ can be more primitively written as $(s,y) \in f$ if you prefer to work in a language with only $\in$. So then we use $$\phi(S,f,y) = \exists s \in S: (s \in S) \land ((s,y) \in f)$$ instead.