We combine resonant scattering with (ptychographic) scanning coherent diffraction microscopy to determine the chemical state of gold nanoparticles with high spatial resolution. Ptychographic images of the sample are recorded for a series of energies around the gold L3 absorption edge. From these data, chemical information in the form of absorption and resonant scattering spectra is reconstructed at each location in the sample. For gold nanoparticles of about 100 nm diameter, a spatial resolution of about 20-30 nm is obtained. In the future, this microscopy approach will open the way to operando studies of heterogeneous catalysts on the nanometer scale.