| MediaWiki file: thumb.php | |
|---|---|
| Location: | / | 
| Source code: | master • 1.40.0 • 1.39.4 • 1.35.11 | 
| Classes: | Find code • Find documentation | 
Details
thumb.php is a script used for creating and streaming thumbnails.
To use it, set $wgThumbnailScriptPath to the path of this file.
Parameters are f for file name, w for width, p for page in multipaged files (if available).
404 Handler
 This script can also be used as a 404 handler to generate image thumbs when they don't exist.
 To use it, follow the steps below, then set $wgGenerateThumbnailOnParse to false. If you have $wgLocalFileRepo defined in LocalSettings.php, then you need to also set:
$wgLocalFileRepo['transformVia404'] = true;
Scripted transform
Just add the following code to the bottom of LocalSettings.php.
$wgThumbnailScriptPath = "$wgScriptPath/thumb.php";
No web server configuration needed. This will cause thumb.php to either return the file if its already been rendered, or render the file on demand if needed.
See also
- $wgThumbnailScriptPath
- thumb_handler.php - 404 handler
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.