catch gallery image extension with capital letters