Skip to content

Instantly share code, notes, and snippets.

@chadclark
Created January 24, 2017 13:41
Show Gist options
  • Save chadclark/4bbe54b802c3c32245d81f2eab1277bf to your computer and use it in GitHub Desktop.
Save chadclark/4bbe54b802c3c32245d81f2eab1277bf to your computer and use it in GitHub Desktop.
Imager Plugin Settings for Craft CMS
<?php
/**
* Imager by André Elvan
*
* @author André Elvan <http://vaersaagod.no>
* @package Imager
* @copyright Copyright (c) 2016, André Elvan
* @license http://opensource.org/licenses/mit-license.php MIT License
* @link https://github.com/aelvan/Imager-Craft
*/
/**
* Configuration file for Imager
*
* Override this by placing a file named 'imager.php' inside your config folder and override variables as needed.
* Multi-environment settings work in this file the same way as in general.php or db.php
*/
return array(
'imagerSystemPath' => getenv('CRAFTENV_BASE_PATH') . 'imager/',
'imagerUrl' => getenv('CRAFTENV_BASE_URL') . 'imager/',
'cacheEnabled' => true,
'cacheDuration' => 31536000, // 365 days
'cacheDurationRemoteFiles' => 31536000, // 365 days
'jpegQuality' => 80,
'pngCompressionLevel' => 2,
'webpQuality' => 80,
'webpImagickOptions' => array(), // additional options you want to pass to Imagick via '$instance->setOption('webp:option', 'value')'.
'useCwebp' => false,
'cwebpPath' => '/usr/bin/cwebp',
'cwebpOptions' => '', // additional options you want to pass to cwebp. Quality is set automatically.
'interlace' => false, // false, true ('line'), 'none', 'line', 'plane', 'partition'
'allowUpscale' => true,
'resizeFilter' => 'lanczos',
'smartResizeEnabled' => false,
'removeMetadata' => false,
'bgColor' => '',
'position' => '50% 50%',
'letterbox' => array('color'=>'#000', 'opacity'=>0),
'hashFilename' => 'postfix', // true, false, or 'postfix' (meaning only the generated part of the filename is hashed)
'hashPath' => false,
'hashRemoteUrl' => false, // true, false, or 'host' (meaning only the host part of the url is hashed)
'instanceReuseEnabled' => false,
'jpegoptimEnabled' => false,
'jpegoptimPath' => '/usr/bin/jpegoptim',
'jpegoptimOptionString' => '-s -P',
'jpegtranEnabled' => false,
'jpegtranPath' => '/usr/bin/jpegtran',
'jpegtranOptionString' => '-optimize -copy none',
'mozjpegEnabled' => true,
'mozjpegPath' => '/usr/bin/mozjpeg',
'mozjpegOptionString' => '-optimize -copy none',
'optipngEnabled' => true,
'optipngPath' => '/usr/bin/optipng',
'optipngOptionString' => '-o5',
'tinyPngEnabled' => false,
'tinyPngApiKey' => '',
'optimizeType' => 'runtime',
'logOptimizations' => false,
'awsEnabled' => false,
'awsAccessKey' => '',
'awsSecretAccessKey' => '',
'awsBucket' => '',
'awsFolder' => '',
'awsCacheDuration' => 1209600, // 14 days
'awsRequestHeaders' => array(),
'awsStorageType' => 'standard', // 'standard' or 'rrs' (reduced redundancy storage)
'curlOptions' => array(),
'runTasksImmediatelyOnAjaxRequests' => true,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment