From 2e442ffd990e42533751a414bf4894b43e1fc29a Mon Sep 17 00:00:00 2001 From: joedolson Date: Mon, 2 Sep 2024 19:18:34 +0000 Subject: [PATCH] deploy: 238fbdb5155395e57152a23265817a6fc63915c9 --- wp-conference-schedule.php.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-conference-schedule.php.html b/wp-conference-schedule.php.html index d2808d0..0d946fa 100644 --- a/wp-conference-schedule.php.html +++ b/wp-conference-schedule.php.html @@ -888,7 +888,13 @@ $image_size = 'thumbnail'; } $image_size = ( is_numeric( $image_size ) ) ? array( $image_size, $image_size ) : $image_size; - echo get_the_post_thumbnail( $post_id, $image_size, array( 'class' => 'wpcsp-speaker-image' ) );} + $thumb_id = get_post_thumbnail_id( $post_id ); + $thumb_size = wp_get_attachment_image_src( $thumb_id, $image_size ); + if ( 720 > $thumb_size[1] || 720 > $thumb_size[2] ) { + $image_size = 'small-square'; + } + echo get_the_post_thumbnail( $post_id, $image_size, array( 'class' => 'wpcsp-speaker-image' ) ); + } ?> <<?php echo esc_html( $heading_level ); ?> class="wpcsp-speaker-name">