A small helper class used to change wrong image file extension to the right one according to the image type