The commons app uses the following action api call to get data about an image
/w/api.php?action=query&format=json&prop=imageinfo&titles=File%3APhoto_on_08-02-2019_at_16.35.jpg&iiprop=extmetadata%7Curl&iiurlwidth=640&iiextmetadatafilter=DateTime%7CCategories%7CGPSLatitude%7CGPSLongitude%20%7CImageDescription%7CDateTimeOriginal%7CArtist%7CLicenseShortName%7CLicenseUrl
It would be great to return captions and statements too so they don't have to run many http queries to get the data. Can use the onGetExtendedMetadata hook to add the data in the WikibaseMediaInfo extension