Fixed typo in image extension detection