I'm not sure much really needs to be done. If XenForo Media Gallery is decentralized as it seems, and it is only possible to "attach" media to posts by inserting a GALLERY tag, then it is already wiki-safe.
It remains to be seen if any additional configuration is needed to get the new "insert media" function to show up in the wiki editor, but I have a feeling it should work out-of-the-box.
There are some caveats to using XMG in the wiki and these cannot really be resolved (for the same reason we could not "fix" vBulletin's attachment system or albums system): the media itself can only be managed by the user who uploaded it and any users that they whitelist, and only these users will ever see those media items in the "insert media" function.
Thus there are benefits to having both XMG and VaultWiki's attachment system:
- VaultWiki allows for attachment versioning and for users to select from ALL media to insert and not just their own uploads.
- Meanwhile XMG allows users to retain control over their uploads and organize them into albums more easily than you would do that in VaultWiki. XMG's editor function currently has a nicer feel than VaultWiki's - but that is partly a styling issue and I haven't tested yet how XMG's implementation fares once you start trying to select from hundreds of images at once.
The problem to achieving perfect integration, however, is related to this issue:
https://www.vaultwiki.org/issues/2977/
VaultWiki added a GALLERY tag too and there is currently no way to rename VaultWiki's tag (although it can be disabled).
I'm going to mark this as a Duplicate, because as far as I know, the only issue that this raises is the GALLERY tag conflict.