A topological space is said to be locally compact if each point $x\in X$ has at least one neighbourhood which is compact. Prove continuous image of a locally compact space is not necessarily locally compact.
Attempted solution:
I was able to find a counter example I believe:
$g:(X',\tau')\to(Y',\tau'')$ where $\tau$ is the discrete topology and $\tau_2$ is the indiscrete topology where $Y'$ is infinite, hence it is not compact(there is no finite open set but $\emptyset$).
However I am striving to see why the image is not necessarily locally compact.
Admitting $f:(X,\tau)\to (Y,\tau_1)$ is a continuous function. Then if $y\in Y$ then $f^{-1}(y)=x$ since $(X,\tau)$ is locally compact then $x\in U$ such that $U$ is compact. Them image of a compact set is a compact set so $y\in f(U)$ so that $f(U)$ is compact. So the image is locally compact.
Question:
1) Since the author states not "necessarily compact". What am I missing?
2) Is my counterexample right?
Thanks in advance!