The absorption of light by materials proceeds through the formation of excitons, which are states in which an excited electron is bound to the valence hole it vacated. Understanding the structure and dynamics of excitons is important, for example, for developing technologies for light-emitting diodes or solar energy conversion. However, there has never been an experimental means to study the time-dependent structure of excitons directly. Here, we use causality-inverted inelastic x-ray scattering (IXS) to image the charge-transfer exciton in the prototype insulator LiF, with resolutions Delta t = 20.67 as (2.067 x 10(-17) s) in time and Delta x = 0.533 A (5.33 x 10(-11) m) in space. Our results show that the exciton has a modulated internal structure and is coherently delocalized over two unit cells of the LiF crystal (approximately 8 A). This structure changes only modestly during the course of its life, which establishes it unambiguously as a Frenkel exciton and thus amenable to a simplified theoretical description. Our results resolve an old controversy about excitons in the alkali halides and demonstrate the utility of IXS for imaging attosecond electron dynamics in condensed matter.