Mapping the potential landscape with high spatial resolution is crucial for quantum technologies based on ultracold atoms. Yet, imaging optical dipole traps is challenging because purely optical methods, commonly used to profile laser beams in free space, are not applicable in vacuum. In this work, we demonstrate precise in-situ imaging of optical dipole traps by probing a hyperfine transition with Ramsey interferometry. Thereby, we obtain an absolute map of the potential landscape with micrometer resolution and shot-noise-limited spectral precision. The idea of the technique is to control the polarization ellipticity of the trap laser beam to induce a differential light shift proportional to the trap potential. By studying the response to polarization ellipticity, we uncover a small but significant nonlinearity in addition to a dominant linear behavior, which is explained by the geometric distribution of the atomic ensemble. Our technique for imaging of optical traps can find wide application in quantum technologies based on ultracold atoms, as it applies to multiple atomic species and is not limited to a particular wavelength or trap geometry.