First-ever high-resolution images of a molecule as it breaks and reforms chemical bonds