organzing images and updating image paths