Featured images and sizes when moving from Fukasawa to Koji
-
Following up on this thread https://www.ads-software.com/support/topic/featured-image-on-posts-is-stretched/ I’m another user working on moving from Fukasawa to Koji. I’m hoping to do it without regenerating image sizes for all of the 2,500+ images in my media library, so I’m testing out this function in my child theme:
function jchphotos_theme_setup() { remove_image_size( 'koji_preview_image_high_resolution' ); remove_image_size( 'koji_preview_image_low_resolution' ); set_post_thumbnail_size( 88, 88, true ); add_image_size( 'post_image', 973, 9999 ); add_image_size( 'post-thumb', 508, 9999 ); add_filter( 'post_thumbnail_size', function() { return 'post-thumb'; } ); } add_action( 'after_setup_theme', 'jchphotos_theme_setup', 11 );
I *believe* this gets me back to the same image size list as was used in Fukasawa and fixes the display of images on single post view pages, without otherwise compromising Kuji’s functionality. I’m a little unsure of this for the high/low res preview images, but so far haven’t noticed an issue.
I realize this is a little hacky and may introduce future issues. But I thought I’d share this here (1) in case it’s useful to others and (2) to see if the theme author has any comments/thoughts on this approach. Thanks!
- The topic ‘Featured images and sizes when moving from Fukasawa to Koji’ is closed to new replies.