Solid-liquid interfaces play a fundamental role in surface electrochemistry(1), catalysis(2), wetting(3), self-assembly(4) and biomolecular functions(5). The interfacial energy determines many of the properties of such interfaces, including the arrangement of the liquid molecules at the surface of the solid. Diffraction techniques are often used to investigate the structure of solid-liquid interfaces(6), but measurements of irregular or inhomogeneous interfaces remain challenging. Here, we report atomic-and molecular-resolution images of various organic and inorganic samples in liquids, obtained with a commercial atomic force microscope operated dynamically with small-amplitude modulation. This approach uses the structured liquid layers close to the solid to enhance lateral resolution. We propose a model to explain the mechanism dominating the image formation, and show that the energy dissipated during this process is related to the interfacial energy through a readily achievable calibration curve. Our topographic images and interfacial energy maps could provide insights into important interfaces.