Skip to content

Instantly share code, notes, and snippets.

@splittingred
Created May 19, 2011 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save splittingred/981110 to your computer and use it in GitHub Desktop.
Save splittingred/981110 to your computer and use it in GitHub Desktop.
$thumbUrl = $item->get('thumbnail',array(
'w' => (int)$modx->getOption('imageWidth',$scriptProperties,500),
'h' => (int)$modx->getOption('imageHeight',$scriptProperties,500),
'zc' => (boolean)$modx->getOption('imageZoomCrop',$scriptProperties,0),
'far' => (string)$modx->getOption('imageFar',$scriptProperties,false),
'q' => (int)$modx->getOption('imageQuality',$scriptProperties,90),
));
/* or */
$thumbUrl = $item->get('thumbnail',array(
'w' => 300,
'h' => 200,
'q' => 100,
'otherPhpThumbParam' => 'value',
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment