Manual:ResourceLoaderImageModule.php

When you reference images in CSS or LESS files, ResourceLoader automatically creates inline data URLs for them (unless you request debug mode with ).

You can see this if you request a module such as XXX

. For greater control you can use ResourceLoaderImageModule This lets you specify a source SVG file, and a  JSON file that indicates variants of it such as the image for right-to-left languages, and  transformations of it, different colors and inverted values. ResourceLoader will transparently generate the transformations of it as SVGs and fallback pngs.

It is used heavily by the MediaWiki theme of OOUI since T92551. When clients request OOUI with, it adds ResourceLoader resources such as 'oojs-ui.styles.icons' to the page. These are defined in resources/Resources.php as a ResourceLoaderImageModule, and the .json file specifies progressive, constructive, and destructive versions of some icons in keeping with the mediawiki.ui colors.

ResourceLoaderImages, ...