Manual:cleanupImages.php
MediaWiki file: cleanupImages.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.39.1 • 1.38.5 • 1.35.9 |
Classes: | ImageCleanup |
DetailsEdit
cleanupImages.php file is a maintenance script to clean up broken or unparseable upload filenames. The edits will be attributed to the user called Conversion script.
UsageEdit
Option/Parameter | Description |
---|---|
--dry-run | Perform a dry run |
Technical detailsEdit
These notes are based on an inspection of cleanupImages.php
from MediaWiki 1.19.
Problematic namesEdit
Image names containing the following elements are candidates for name replacement:
- percent codes
- HTML entities
- deprecated Latin-1 characters
- non-normalized Unicode
Replacement namesEdit
When encountering a problematic image name, the script will attempt to automatically derive a safe name. If the derived name comes up empty (perhaps there is nothing left after removal of unsafe characters) or the derived name matches the name of another image which already exists, the problematic image file will be skipped without name replacement.