Photonic and plasmonic devices rely on nanoscale control of the local density of optical states (LDOS) in dielectric and metallic environments. The tremendous progress in designing and tailoring the electric LDOS of nano-resonators requires an investigation tool that is able to access the detailed features of the optical localized resonant modes with deep-subwavelength spatial resolution. This scenario has motivated the development of different nanoscale imaging techniques. Here, we prove that a technique involving the combination of scanning near-field optical microscopy with resonant scattering spectroscopy enables imaging the electric LDOS in nano-resonators with outstanding spatial resolution (l/19) by means of a pure optical method based on light scattering. Using this technique, we investigate the properties of photonic crystal nanocavities, demonstrating that the resonant modes appear as characteristic Fano line shapes, which arise from interference. Therefore, by monitoring the spatial variation of the Fano line shape, we locally measure the phase modulation of the resonant modes without the need of external heterodyne detection. This novel, deep-subwavelength imaging method allows us to access both the intensity and the phase modulation of localized electric fields. Finally, this technique could be implemented on any type of platform, being particularly appealing for those based on non-optically active material, such as silicon, glass, polymers, or metals.