Now handling the case that image has no extention