delete the images first