-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
I am using the new version 1.3 with Get the Image plugin
Here is a snippet of my code
$masonry_grid_loop = new WP_Query($args);
$x = 0; if($masonry_grid_loop->have_posts()): while ( $masonry_grid_loop->have_posts() ) : $masonry_grid_loop->the_post();
//check if we have images
$params = array( 'width' => 270, 'height' => 270, 'crop' => true );
if ( function_exists( 'get_the_image' )) {
$image = get_the_image( array( 'image_scan' => true, 'format' => 'array', 'size' => 'full' ) );
//resize image for full width stuff
}
<div class="item<?php $post_type = get_post_type(); if($post_type == 'case_study') { echo ' item2x'; } ?><?php if( ! empty ( $image ) ) { echo ' w-media'; }?>">
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if( ! empty ( $image ) ) { ?>
<div class="media">
<a href="<?php the_permalink();?>"><img src="<?php echo bfi_thumb( $image[src], $params );?>" /></a>
</div>
<?php } ?>
</div>
</div>
The image i am trying to upload is attached.
Now when i remove the $params, bfi_thumb works perfectly else it doesn't.
I think it is finding it hard to get the crop stuff for smaller images or am I doing something wrong?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
