Hovercard images appear to always be loaded at 1x density; on a 'Retina'/hi-DPI display this leads to the preview images being a bit blurry. This is especially noticeable on diagrams/flags/maps/etc such in as the below screenshot, but is visible on photos as well.
|mediawiki/core : master||Provide $.bracketedDevicePixelRatio convenience function|
|mediawiki/extensions/Popups : master||Hi-DPI/Retina support for hovercard images|
It seems to be any image generated on the server or client (maybe the latter via oojs or oojs ui) via a standard API (e.g. mw.util.getImageElement / file->getImage() should have data attributes and apply them for hdpi support..
Jon -- that's a good concern to have. I'll look into a cleaner high-level solution for JS stuff...
On PHP side, things using the standard wiki methods of image output should already give the 1/1.5/2x densities in srcset automatically, but I do seem to recall that doesn't cover all output cases. (At least early on, galleries and a couple other places didn't trigger the multiple resolutions.)