Simpleminded counterexample to the question as stated: let $K'$ be the closed unit disk in $\mathbb{R}^2$ and $K = \partial K'$ be the unit circle (so also $\partial K = K$), and let $f\colon K\to K'$ be the inclusion map.
↧