Use Exif Data to check the image type, Do not rely on extention
Merge pull request #2788 from exussum12/exif_imagetype

Use Exif Data to check the image type, Do not rely on extention