Change image name logic