We consider the near-critical dimer model on isoradial graphs, with Temperleyan boundary conditions. We show that the centered height function converges as the mesh size tends to zero to a limiting field which agrees with the (electromagnetically tilted) sine-Gordon model at the free fermion point. This answers a longstanding question in the field. A crucial part of the work is to develop a notion of massive holomorphicity both in the continuum and at the discrete level.