Available from version 1.18.0 (r84278, codereview)
Before a file is transformed, gives extension the possibility to transform it themselves.
Define function:
public static function onBitmapHandlerTransform( $handler, $image, &$scalerParams, &$mto ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"BitmapHandlerTransform": "MediaWiki\\Extension\\MyExtension\\Hooks::onBitmapHandlerTransform"
Called from: File(s): media/TransformationalImageHandler.php
Interface: BitmapHandlerTransformHook.php

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

Details edit

  • $handler: BitmapHandler
  • $image: File
  • &$scalerParams: Array with scaler parameters
  • &$mto: null, set to a MediaTransformOutput