Aqua Resizer


//you will need to download aqua resizer and upload it to your project
//https://github.com/syamilmj/Aqua-Resizer
require_once( dirname(__FILE__) . '/lib/aq_resizer.php');

//working example
    
    $project_image = get_post_meta($portfolioItem->ID, '_portfolio_project_page_image', true);

    $original_image = $project_image; // let's assume this image has the size 100x100px
    $width = 410; // note, how this exceeds the original image size
    $height = 267; // some pixel less than the original
    $crop = true; // if this would be false, You would get a 90x90px image. For users of prior
    // Aqua Resizer users, You would have get a 100x90 image here with $crop = true
    $new_image = aq_resize($original_image, $width, $height, $crop);

    ?>
    
    <?php echo '<img class="img-responsive" src="'. $new_image. '">'; ?>