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 0777 (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 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.
  • If you are worried about disk space, you can delete all of the font files out of the /system/expressionengine/third_party/ce_img/fonts directory, except heros-bold.ttf (it’s the default font).

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.