Function __global->handle_images_cleanup_pipeline
Definitions
sources/images_cleanup_pipeline.php
- Cleanup an image to make it web-appropriate.This code is intentionally cowardly - it will just silently return if there are errors.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $path | PATH | No | No | required parameter | N/A | N/A | The image path |
| $filename | ?ID_TEXT | No | No | Null | N/A | N/A | The image filename (null: get from path) |
| $recompress_mode | integer | No | No | 1 | N/A | N/A | How to recompress, an IMG_RECOMPRESS_* constant |
| $maximum_dimension | ?integer | No | No | Null | N/A | N/A | The size of the bounding box (null: none) |
| $watermarks | ?array | No | No | Null | N/A | N/A | Watermark corners (top-left, top-right, bottom-left, bottom-right) (null: none) |
| $strip_gps | boolean | No | No | True | N/A | N/A | Whether to strip GPS metadata |
Preview
Code (PHP)
/**
* Cleanup an image to make it web-appropriate.This code is intentionally cowardly - it will just silently return if there are errors.
*
* @param PATH $path The image path
* @param ?ID_TEXT $filename The image filename (null: get from path)
* @param integer $recompress_mode How to recompress, an IMG_RECOMPRESS_* constant
* @param ?integer $maximum_dimension The size of the bounding box (null: none)
* @param ?array $watermarks Watermark corners (top-left, top-right, bottom-left, bottom-right) (null: none)
* @param boolean $strip_gps Whether to strip GPS metadata
*/
function handle_images_cleanup_pipeline(string $path, ?string $filename = null, int $recompress_mode = 1, ?int $maximum_dimension = null, ?array $watermarks = null, bool $strip_gps = true)
* Cleanup an image to make it web-appropriate.This code is intentionally cowardly - it will just silently return if there are errors.
*
* @param PATH $path The image path
* @param ?ID_TEXT $filename The image filename (null: get from path)
* @param integer $recompress_mode How to recompress, an IMG_RECOMPRESS_* constant
* @param ?integer $maximum_dimension The size of the bounding box (null: none)
* @param ?array $watermarks Watermark corners (top-left, top-right, bottom-left, bottom-right) (null: none)
* @param boolean $strip_gps Whether to strip GPS metadata
*/
function handle_images_cleanup_pipeline(string $path, ?string $filename = null, int $recompress_mode = 1, ?int $maximum_dimension = null, ?array $watermarks = null, bool $strip_gps = true)

