Recently I learned about the notion of a proper map in metric spaces. Namely, if $X$, $Y$ are metric spaces, then a map $f:X\rightarrow Y$ is called proper iff for every compact set $K\subseteq Y$ the set $f^{-1}(K) \subseteq X$ is compact. I wondered whether all proper maps between metric spaces are closed as well. All the proofs I found on the net (e.g. http://vmm.math.uci.edu/PalaisPapers/WhenProperMapsAreClosed.pdf or When is the image of a proper map closed?) use at some point that the image of a compact set is compact. I thought that the following is a counterexample: Endow $\mathbb{R}$ with the Euclidian metric then
$f: \mathbb{R} \rightarrow \mathbb{R}, \ f(x)= \begin{cases} \vert x \vert, &\vert x \vert\geq 1, \\ \frac{1}{\vert x \vert}, &0<\vert x \vert<1, \\ -1, &x=0. \end{cases}$
is proper, $[-1,1]$ is compact, but $f([-1,1])=[1,\infty)$ is not compact. What am I doing wrong?