corrected invalid regex for determining image type