We currently have a default gadget that displays the image inline using jquery.ui (https://www.wikidata.org/wiki/MediaWiki:Gadget-CommonsMedia.js) but it would be much much cooler/better to use MediaViewer for this.
|Resolved||hoo||T71456 [Story] Use MediaViewer on commonsMedia properties on Wikibase repo|
|Resolved||hoo||T46727 [Story] Statement should show a thumbnail for image/video/audio properties|
|Resolved||hoo||T192869 Image link should link to Commons and not local file|
|Open||None||T219226 See the details of the thumbnails while editing a Wikidata entity|
|Declined||Tgr||T147637 Investigate possibility to use MediaViewer for images not present in the DOM|
- Mentioned In
- T147637: Investigate possibility to use MediaViewer for images not present in the DOM
- Mentioned Here
- T46727: [Story] Statement should show a thumbnail for image/video/audio properties
T59298: The viewer box should not depend on the current page
T77152: Support Developer Plugins/Gadgets in Media Viewer
T108778: Multimediaviewer does not open by default on banners added by WikidataPageBanner
Related MV tasks: T59298: The viewer box should not depend on the current page, T77152: Support Developer Plugins/Gadgets in Media Viewer. @hoo if you have thoughts on what kind of hooks would be helpful please add it to that task!
If T46727: [Story] Statement should show a thumbnail for image/video/audio properties is resolved, we will get this for free :)
(Someone needs to disable the gadget in that case, though)
Actually I was (slightly) wrong here, while MMV is going to pick up the images automatically, it does not automatically load.
This is because the loading of the required RL modules is not (automatically) triggered.
This is because MMV loads [ 'mmv.head', 'mmv.bootstrap.autostart' ] (for non-file pages) only if OutputPage::getFileSearchOptions is non-empty. But for Wikibase entities, getFileSearchOptions is empty, as we register images without sha1 or timestamp in ParserOutput::addImage. I'm not sure how to proceed here… I don't see how MMV would be able to find out whether images exist on a page. Maybe Wikibase should actually also set the sha1 and timestamp?