This function calls up to four external programs, which must be installed and available in the $PATH:
* SVGO
* image_optim
* picopt
* ImageOptim
Note that these are executed using PHP’s exec command, so there may be security implications.
public static optimize ( string $path, integer $svgo, integer $image_optim, integer $picopt, integer $imageOptim ) | ||
$path | string | The path to the file or directory that should be optimized. |
$svgo | integer | The number of times to optimize using SVGO. |
$image_optim | integer | The number of times to optimize using image_optim. |
$picopt | integer | The number of times to optimize using picopt. |
$imageOptim | integer | The number of times to optimize using ImageOptim. |