Used exif_imagetype to validate image