Available from version 1.19.0
Called before thumbnails for a local file are purged.
Define function:
public static function onLocalFilePurgeThumbnails( $file, $archiveName ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"LocalFilePurgeThumbnails": "MediaWiki\\Extension\\MyExtension\\Hooks::onLocalFilePurgeThumbnails"
Called from: File(s): LocalFile.php
Interface: LocalFilePurgeThumbnailsHook.php

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

Details edit

  • $file: the File object
  • $archiveName: name of an old file version or false if it's the current one

See also edit