I am using ExpressionEngine 2.5.2 and I'm having trouble getting my ed_imageresizer to work on my second site, setup through Multisite Manager. ed_imageresizer is installed and working on my primary site, however, when I try to use it on my second site, I see broken images where the resized image should be. In my system's config.php file, I have the paths to my first site setup correctly (these are paths located on my local environment):
$config['ed_server_path'] = '/Users/cplaptop/Sites/site1/html/';
$config['ed_cache_path'] = '/Users/cplaptop/Sites/site1/html/images/resizer_cache/';
In my template, I am including the ed_imageresizer code to find the image:
{exp:ed_imageresizer
image="{image}"
maxWidth="400"
cropratio="400:225"
quality="100"
alt="Portfolio Artwork"}
I tried swapping out those paths just to test if they are directing anything to the second site like this (which didn't work):
$config['ed_server_path'] = '/Users/cplaptop/Sites/site2/html/';
$config['ed_cache_path'] = '/Users/cplaptop/Sites/site2/html/images/resizer_cache/';
When I try directing the plugin to the second site, in my browser I no longer see broken images, I just don't see anything at all.
I have also tried the suggestion found here to create a conditional in my config.php, but I haven't been able to get that to work. When I try using conditionals, here is the code that I'm using in my config.php:
$host = $_SERVER[‘HTTP_HOST’];
if($host == ‘domain.com’ or $host == ‘www.domain.com’) {
$config[‘ed_server_path’] = ‘/Users/cplaptop/Sites/site1/html/’; // Server path to your site’s web root
$config[‘ed_cache_path’] = ‘/Users/cplaptop/Sites/site1/html/images/resizer_cache/’; // Server path to where your resized images should be stored
}
$host = $_SERVER[‘HTTP_HOST’];
if($host == ‘domain.com’ or $host == ‘www.domain.com’) {
$config[‘ed_server_path’] = ‘/Users/cplaptop/Sites/site2/html/’; // Server path to your site’s web root
$config[‘ed_cache_path’] = ‘/Users/cplaptop/Sites/site2/html/images/resizer_cache/’; // Server path to where your resized images should be stored
}
Am I missing anything here? When I try this route, neither my primary or secondary sites show images. I'm willing to try any way that works, so all suggestions are appreciated!