The image of a path-connected set under a continuous map is path-connected
Suppose $x,y\in f(X)\subset Y$ so that we can say $x=f(a)$ and $y=f(b)$. Then there is a path $\gamma:[0,1]\rightarrow X$ such that $\gamma(0)=a$ and $\gamma(1)=b$. The composition, $f\circ \gamma$ is then a continuous path on $f(X)$ with the desired property.
Let $y_0 = f(x_0), y_1 = f(x_1)$ two elements of $f(X)$.
Consider a path joining $x_0$ to $x_1$: $$ \gamma \in C([0, 1], X);\\ \gamma(i) = x_i\ \ \ \ (i\in \{0, 1\}) $$
Then $f \circ \gamma$ is a path joining $y_0$ and $y_1$.