Last modified: 2014-04-18 23:52:14 UTC
e.g. https://www.mediawiki.org/wiki/Talk:Flow
The markup for the image is <figure class="mw-default-size" typeof="mw:Image/Thumb" data-parsoid="{"optList":[{"ck":"thumbnail","ak":"thumb"}],"dsr":[0,57,2,2]}"><a href="./File:Flow-echo_notices_need_longer_excerpts.png" data-parsoid="{"a":{"href":"./File:Flow-echo_notices_need_longer_excerpts.png"},"dsr":[2,55,null,null]}"><img resource="./File:Flow-echo_notices_need_longer_excerpts.png" src="//upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Flow-echo_notices_need_longer_excerpts.png/220px-Flow-echo_notices_need_longer_excerpts.png" height="185" width="220" data-parsoid="{"a":{"resource":"./File:Flow-echo_notices_need_longer_excerpts.png","height":"185","width":"220"},"sa":{"resource":"File:Flow-echo notices need longer excerpts.png"}}"></a></figure> "figure[typeof=mw:Image/Thumb] img" seems like a good selector to match these. We would need to refactor MultimediaViewerBootstrap.processThumb a bit since too much of the current thumb markup is hardcoded in the logic.
Thanks for the analysis. Parsoid produces the markup. Flow has a bug 61786 to style that HTML better (borders and Enlarge/magnify icon). More notes from Gergő's on this: * MultimediaViewerHooks::getModulesForArticle() - this checks if the image has any articles at all. It uses $out->getFileSearchOptions(), dunno if that works with Flow. If not, you need to add another exception like the one we have for file pages. * processThumb() in mmv.bootstrap.js - this is the that selects the actual images from the DOM. * MultimediaViewerHooks::thumbnailBeforeProduceHTML() adds size information to images and createNewImage() in mmv.js reads it back. Images without size information will still work, but having that information there makes the viewer more performant.