Manual:thumb.php
Appearance
| Archivo de MediaWiki: thumb.php | |
|---|---|
| Ubicación: | / |
| Código fuente: | master • 1.46.0 • 1.45.4 • 1.43.9 |
| Clases: | Buscar código • Buscar documentación |
Detalles
thumb.php is a script used for creating and streaming thumbnails.
To use it, set $wgThumbnailScriptPath to the path of this file.
Parameters are:
| Name | Required? | Description |
|---|---|---|
| f | Required | file name |
| w | Optional | width |
| p | Optional | page in multipaged files (if available) |
| lang | Optional | multi-language SVGs, to render a particular language |
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
Solo agrega el código siguiente al final de 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.
Véase también
- $wgThumbnailScriptPath
- thumb_handler.php – 404 handler