clean up image name determination