Skip to content

Instantly share code, notes, and snippets.

@sebbdk
Created September 30, 2012 14:49
Show Gist options
  • Select an option

  • Save sebbdk/3806981 to your computer and use it in GitHub Desktop.

Select an option

Save sebbdk/3806981 to your computer and use it in GitHub Desktop.
Configure::write('Assets.ImageSize.suitcaseImage191×175', array(
'name' => 'suitcaseImage191×175',
'callback' => function($Image) {
$Image->applyFilter('resize', array('width' => 0, 'height' => 175));
if($Image->getImageWidth() > 191) {
$Image->applyFilter('resize', array('width' => 191, 'height' => 0));
}
$Image->applyFilter('canvas', array('width' => $Image->getImageWidth(), 'height' => $Image->getImageHeight()));
}
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment