Installation

Setup

ExpressionEngine® 2.x

  • Upload the ce_img folder to the /system/expressionengine/third_party directory.
  • Create the directory /images/made and make sure it has permissions set to 0775 (this is the default, but you may be able to get away with a lower permission setting depending on your server). You can change the cache directory globally and/or override it anytime via the cache_dir parameter). If you cache to other directories, you will need to ensure that they have write permissions.
  • Create the directory /images/remote and make sure it has permissions set to 0775 (this is the default, but you can change this globally and/or override it anytime via the remote_dir parameter). If you download your remote images to other directories, you will need to make sure that they have write permission as well.

For Nexcess hosting: The PHP document root does not reflect the actual server path. You can add the following to your EE /system/expressionengine/config/config.php file to correct the issue:
$config['ce_image_document_root'] = '/chroot' . $_SERVER['DOCUMENT_ROOT'];

Optional Components

  • AWS Integration - If you would like to integrate CE Image with Amazon S3, simply follow these instructions:

    • Upload the ce_img_aws folder to the /system/expressionengine/third_party directory.
    • In the ExpressionEngine® control panel, enable the extension by navigating to Add-Ons -> Extensions, and then click the "Enable?" link for the "CE Image - AWS" table row.
    • Add your AWS settings to your config. See Advanced Configuration for instructions on setting up your AWS configuration settings.
  • Fonts - By default, only the default font (heros-bold.ttf) is included in the /system/expressionengine/third_party/ce_img/fonts directory. You can download 32 additional open source .ttf fonts for use in your site from here if you wish. These optional fonts can be used with the text= parameter for text watermarking. You can, of course, use other open source or commercial .ttf fonts (if their EULA permits) if you desire.

ExpressionEngine® 1.x

  • Upload the pi.ce_img.php file to the system/plugins directory.
  • If the system/plugins/libraries directory does not already exist, create it. Copy the contents of the library folder in the CE Image download into the system/plugins/libraries directory.
  • If the system/plugins/fonts directory does not already exist, create it. Copy the contents of the fonts folder in the CE Image download into the system/plugins/fonts directory.
  • Create the directory /images/made and make sure it has permissions set to 0775 (this is the default, but you can change this globally and/or override it anytime via the cache_dir parameter). If you cache to other directories, you will need to ensure that they have write permission.
  • Create the directory /images/remote and make sure it has permissions set to 0775 (this is the default, but you can change this globally and/or override it anytime via the remote_dir parameter). If you download your remote images to other directories, you will need to make sure that they have write permission as well.

MSM Setup

If you will be sharing images across your Multiple Site Manager (MSM) domains, and will be calling them by URL, you will want to replace the domain part of the URL with its corresponding server path. This is desirable because it will prevent the plugin from unnecessarily downloading the source images from the other domains to your “remote cache” directory. It’s simply a find and replace setting (the example is for EE2):

$config['ce_image_src_regex'] = array(
    '^http://example1.com/' => '/var/vhosts/example1.com/httpdocs/',
    '^http://example2.com/' => '/var/vhosts/example1.com/httpdocs/example2/',
    '^http://example3.com/' => '/var/vhosts/example3.com/httpdocs/example3/',
    '^http://example4.com/' => '/var/hosts/example4.com/httpdocs/'
);

The little ^ just means “starts with” in RegEx lingo, so in the example above, the items on the domains on the left are replaced with their corresponding server paths. You can learn more about this setting, like how to set it for EE1 or on a per domain basis, in the Advanced Configuration and MSM Configuration Overrides sections below.