make image extension helper case insensitive