Perhaps this needs a bit more clarification:
1. Your question is really about **functions** in general and not related to linear algebra.
2. Any function should be thought of as a triple $(f, X, Y)$ which is normally denoted by $f\colon X\to Y$. In other words, whenever you're talking about a function, you should have fixed (at least implicitly) a domain and a codomain for it. Therefore, strictly speaking writing $$f\colon X\to \operatorname{Im} f$$ is not correct, because once you change the codomain you're dealing with a new function and you'd better use a different letter, say $g$, to denote it to avoid confusion. Of course, when you get comfortable with these notions, you can get a little sloppy and say things like ``any function is onto its image,'' etc.
PS I just noticed that SRX has made the same point 2 in his comment earlier.