We introduce a Gibbs measure on nearest-neighbour paths of length $t$ in the Euclidean $d$-dimensional lattice, where each path is penalised by a factor proportional to the size of its boundary and an inverse temperature $beta$. We prove that, for all $beta>0$, the random walk condensates to a set of diameter $(t/beta)^{1/3}$ in dimension $d=2$, up to a multiplicative constant. In all dimensions $dge 3$, we also prove that the volume is bounded above by $(t/beta)^{d/(d+1)}$ and the diameter is bounded below by $(t/beta)^{1/(d+1)}$. Similar results hold for a random walk conditioned to have local time greater than $beta$ everywhere in its range when $beta$ is larger than some explicit constant, which in dimension two is the logarithm of the connective constant.