Skip to content

Instantly share code, notes, and snippets.

@nucklearproject
Created September 25, 2012 13:22
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 nucklearproject/3781785 to your computer and use it in GitHub Desktop.
Save nucklearproject/3781785 to your computer and use it in GitHub Desktop.
Drupal imagecache, resize image only if large with imagacache_customactions
imagecache, imagacache_customactions example
if($image->info['width'] < 500 || $image->info['height'] < 500 ){
//imageapi_image_scale($image, $width = 500 );
return $image;
} else {
imageapi_image_scale($image, $width = 500 );
return $image;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment