No. Let $X$ be a Hausdorff space which fails to be locally compact at precisely one point. Now take the Alexandroff compactification of $X$, adding exactly one new point, whose neighborhoods have compact complement in $X$. The new space is not Hausdorff, but has the property that it is compact, and each compact subspace is closed. In general the image of a compact space is compact, and hence each retract of the new space is a closed subspace of itself.
Paul Fabel
- 2k
- 15
- 23