Tuning the energy of an x-ray probe to an absorption line or edge can provide material-specific measurements that are particularly useful for interfaces. Simulated hard x-ray images above the Fe K-edge are presented to examine ion diffusion across an interface between Fe2O3 and SiO2 aerogel foam materials. The simulations demonstrate the feasibility of such a technique for measurements of density scale lengths near the interface with submicron spatial resolution. A proof-of-principle experiment is designed and performed at the Linac coherent light source facility. Preliminary data show the change of the interface after shock compression and heating with simultaneous fluorescence spectra for temperature determination. The results provide the first demonstration of using x-ray imaging at an absorption edge as a diagnostic to detect ultrafast phenomena for interface physics in high-energy-density systems.