Manual:Hooks/ParserModifyImageHTML

ParserModifyImageHTML
Available from version 1.38.0 (Gerrit change 743061)
This hook is called for each image added to parser output, with its associated HTML as returned from Linker::makeImageLink().
Define function:
public static function onParserModifyImageHTML( Parser $parser, File $file, array $params, string &$html ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ParserModifyImageHTML": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserModifyImageHTML"
	}
}
Called from: File(s): parser/Parser.php
Function(s): onParserModifyImageHTML
Interface: ParserModifyImageHTMLHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ParserModifyImageHTML extensions.