Compare T212144: Allow access to MediaInfo from wikitext on Commons.
This will involve some dispatch process. Something similar to T194950: Include Wikibase dispatch lag in API "maxlag" enforcing should be done, but also notice T238796: Entity and non-entity edits should use different maxlag.