The bug is happening on the articles that have gifs as their display images.
Plugin Author
Tom
(@edge22)
It looks like our image resizer isn’t compatible with gifs.
You’ll need to remove the size values from the image settings and use CSS to resize them instead, for now.
Well, the crazy thing is that gifs work fine on other blogs, like digitaliza/blog (check the post from november 16) and we really heaven’t done anything to fix it. It just turns the gifs into static images.
How would I go about fixing the images size manually?
Plugin Author
Tom
(@edge22)
You could remove the width and height values from the WPSP settings, then use some CSS like this:
.wp-show-posts-image img {
width: 260px;
height: 165px;
object-fit: cover;
}
Thanks, I solved by adding this to test if gif:
$thumb_url_low = strtolower($image_url[0]);
$is_gif = strpos($thumb_url_low, '.gif') == true;
And then I do modify the part where the image is rendered:
if(!$is_gif){
if ( ! empty( $image_atts ) ) : ?>
<img src="<?php echo WPSP_Resize( $image_url[0], $image_atts[ 'width' ], $image_atts[ 'height' ], $image_atts[ 'crop' ], true, $image_atts[ 'upscale' ] ); ?>" alt="<?php esc_attr( the_title() ); ?>" itemprop="image" class="<?php echo $settings[ 'image_alignment' ]; ?>" />
<?php else :the_post_thumbnail( apply_filters( 'wpsp_default_image_size', 'full' ), array( 'itemprop' => 'image' ) );
endif;
}else{
the_post_thumbnail( $size = [$settings[ 'image_width' ], $settings[
'image_height' ]], $attr = '');
}
Plugin Author
Tom
(@edge22)
That’s definitely one way to do it, but you’ll need to make those changes each time the plugin is updated.
Any way we can extend pagination to 1-10 instead of 1-2?