fixed image name parsing