replacing references of images again