PHP code example of globalis / wp-cubi-imagemin

1. Go to this page and download the library: Download globalis/wp-cubi-imagemin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

globalis / wp-cubi-imagemin example snippets


define('WP_CUBI_IMAGEMIN_PATH_BIN_ADVPNG', '/var/www/your-project/bin/advpng');
define('WP_CUBI_IMAGEMIN_PATH_BIN_GIFSICLE', '/var/www/your-project/bin/gifsicle');
define('WP_CUBI_IMAGEMIN_PATH_BIN_JPEGOPTIM', '/var/www/your-project/bin/jpegoptim');
define('WP_CUBI_IMAGEMIN_PATH_BIN_JPEGTRAN', '/var/www/your-project/bin/jpegtran');
define('WP_CUBI_IMAGEMIN_PATH_BIN_OPTIPNG', '/var/www/your-project/bin/optipng');
define('WP_CUBI_IMAGEMIN_PATH_BIN_PNGCRUSH', '/var/www/your-project/bin/pngcrush');
define('WP_CUBI_IMAGEMIN_PATH_BIN_PNGOUT', '/var/www/your-project/bin/pngout');
define('WP_CUBI_IMAGEMIN_PATH_BIN_PNGQUANT', '/var/www/your-project/bin/pngquant');
define('WP_CUBI_IMAGEMIN_PATH_BIN_SVGO', '/var/www/your-project/bin/svgo');