Skip to content

Instantly share code, notes, and snippets.

@proframework
Created August 29, 2013 20:10
Show Gist options
  • Save proframework/6382826 to your computer and use it in GitHub Desktop.
Save proframework/6382826 to your computer and use it in GitHub Desktop.
if ( $width == 'false' ) $width = false;
if ( $height == 'false' ) $height = false;
// If the width or height are null, turn off cropping
if ( empty($width) or empty($height) ) $crop_position = false;
$image = matthewruddy_image_resize($resized_image,$width, $height, $crop_position);
echo '<img src="' . $image['url'] . '" width="' . $width . '" height="' . $height . '" alt="" />';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment