You are here

function imageapi_optimize_drush_command in Image Optimize (or ImageAPI Optimize) 7.2

Implements hook_drush_command().

File

./imageapi_optimize.drush.inc, line 10

Code

function imageapi_optimize_drush_command() {
  $commands = array();
  $commands['imageapi-optimize'] = array(
    'description' => dt('Optimize images using a specified pipeline.'),
    'drupal dependencies' => array(
      'imageapi_optimize',
    ),
    'arguments' => array(
      'path' => array(
        dt('The path of a single image or directory of images to optimize.'),
      ),
    ),
    'required-arguments' => TRUE,
    'options' => array(
      'pipeline' => array(
        'description' => dt('Which imageapi optimize pipeline to use.'),
        'required' => TRUE,
      ),
      'recursive' => array(
        'description' => dt('If a folder is specified to optimize, should it be searched recursively for files.'),
      ),
      'extensions' => array(
        'description' => dt('Comma separated list of file extensions to search for. Default: png,jpg,jpeg'),
      ),
      'no-backup' => array(
        'description' => dt('Skip the backup of the original file'),
      ),
    ),
  );
  return $commands;
}