In my [previous question][1] it was established that if $X$ is a metrizable, connected, locally path connected space and $K\subset X$ is compact, then there is a compact connected $L\subset X$ such that $K\subset L$. After revising that question (or rather Anton Petrunin's [answer](https://mathoverflow.net/a/359395)) it occured to me that I don't know how to make $L$ path connected. This motivated the following questions.

>Let $X$ be as above and $\pi_k(X)$ is trivial, for $k=0,...,n$ (resp $X$ is contractible). If $K\subset X$ is compact can we find a compact $L\subset X$ such that $K\subset L$ and $\pi_k(L)$ is trivial, for $k=0,...,n$ (resp $L$ is contractible)?

Regarding the "contractible version", here is an idea that does not work: let $F:X\times[0,1] \to X$ be a homotopy from the identity to a constant. It is tempting to try to show that $F(K\times [0,1])$ is the set that we are looking for. However, if we started with $K$ a singleton, the obtained set can be any Peano continuum, and so not necessarily contractible.




  [1]: https://mathoverflow.net/questions/359390/is-it-possible-to-connect-every-compact-set