public static function guessExtensionForLocalFile($file_path, $fallback_extension = '')
    {
        // FILEINFO_MIME would return the mime encoding as well
        $finfo = new finfo(FILEINFO_MIME_TYPE);
        $mime_type = $finfo->file($file_path);

        return static::guessExtensionByMimeType($mime_type, $fallback_extension);
    }