Resistive switching in transition metal oxides involves intricate physical and chemical behaviours with potential for non-volatile memory and memristive devices. Although oxygen vacancy migration is known to play a crucial role in resistive switching of oxides, an in-depth understanding of oxygen vacancy-driven effects requires direct imaging of atomic-scale dynamic processes and their real-time impact on resistance changes. Here we use in situ transmission electron microscopy to demonstrate reversible switching between three resistance states in epitaxial La2/3Sr1/3MnO3 films. Simultaneous high-resolution imaging and resistance probing indicate that the switching events are caused by the formation of uniform structural phases. Reversible horizontal migration of oxygen vacancies within the manganite film, driven by combined effects of Joule heating and bias voltage, predominantly triggers the structural and resistive transitions. Our findings open prospects for ionotronic devices based on dynamic control of physical properties in complex oxide nanostructures.