Rewrite GetImageName functionality