updating image and thumbnail references