Suppose I have a manifold $M$ (without boundary) and a subset $S$ such that it is locally an image of an immersion. Namely, for any $s\in S$ there exists an open set $U_s \subset M$ with $s \in U_s$, a manifold $N_s$ and an immersion $i_s: N_s \to M$ such that $S\cap U_s $ is the image of $i_s$. Does there exist a manifold $N$ and an immersion $i$ such that $S$ is the image of $i$?
What if I assume $S$ is compact? Does there exist a closed manifold $N$ with this property in this case?