The dimer model on a finite bipartite graph is a uniformly chosen perfect matching, i.e., a set of edges which cover every vertex exactly once. It is a classical model of mathematical physics, going back to work of Kasteleyn and Temeperley/Fisher in the 1960s.A central object for the dimer model is a notion of height function introduced by Thurston, which turns the dimer model into a random discrete surface. I will discuss a series of recent results with Benoit Laslier (Paris) and Gourab Ray (Victoria) where we establish the convergence of the height function to a scaling limit in a variety of situations. This includes simply connected domains of the plane with linear boundary conditions for the height, in which case the limit is the Gaussian free field, and Temperleyan graphs drawn on Riemann surfaces. In all these cases the scaling limit is universal (i.e., independent of the details of the graph) and conformally invariant. A key new idea in our approach is to exploit "imaginary geometry" couplings between the Gaussian free field and SLE curves