Within Modx Revolution, I'm trying to get phpthumb to work from within a snippet I'm writing - I think I have almost all the pieces, but I've a hunch that maybe I'm not formatting the image filepath correctly.
This is the code I have:
$input = "http://www.domain.com/assets/files/".$cover;
$width = 610;
$height = 504;
$options = "w=$width&h=$height&zc=1";
$thumb = $modx->runSnippet("phpthumbof",array('input' => $input, 'options' => $options));
If I comment out the last line, the page loads without errors, but uncommented I get an error and nothing else:
The image “http://www.domain.com/” cannot be displayed because it contains errors.
But if I echo the value of $input, it does give the image URL, so I assume that phpthumb doesn't want a URI string...?
What am I doing wrong?