Tracing the motion of electrons has enormous relevance to understanding ubiquitous phenomena in ultrafast science, such as the dynamical evolution of the electron density during complex chemical and biological processes. Scattering of ultrashort x-ray pulses from an electronic wave packet would appear to be the most obvious approach to image the electronic motion in real time and real space with the notion that such scattering patterns, in the far-field regime, encode the instantaneous electron density of the wave packet. However, recent results by Dixit et al. [Proc. Natl. Acad. Sci. U.S.A. 109, 11636 (2012)] have put this notion into question and have shown that the scattering in the far-field regime probes spatiotemporal density-density correlations. Here, we propose a possible way to image the instantaneous electron density of the wave packet via ultrafast x-ray phase contrast imaging. Moreover, we show that inelastic scattering processes, which plague ultrafast scattering in the far-field regime, do not contribute in ultrafast x-ray phase contrast imaging as a consequence of an interference effect. We illustrate our general findings by means of a wave packet that lies in the time and energy range of the dynamics of valence electrons in complex molecular and biological systems. This present work offers a potential to image not only instantaneous snapshots of nonstationary electron dynamics, but also the laplacian of these snapshots which provide information about the complex bonding and topology of the charge distributions in the systems.