Allows outside configuration and verifies file type using `exif_imagetype()`.
Verifying the image file type using `exif_imagetype()` is more reliable than using the filename extension and allows more flexibility. It now supports image files without an extension in their name.