post thumbnails – Cropped featured image


I have the code below in functions.php and have already regenerated the thumbnail of the featured image and I can see the custom size is generated as well but still the size of the featured image on the post doesn’t change. What steps could I be missing here?

if ( function_exists( 'add_theme_support' ) ) {
  add_theme_support( 'post-thumbnails' );
  set_post_thumbnail_size( 1077, 496, true ); 
  add_image_size( 'featured-thumb', 1077, 496, true ); 

There is a big featured image (2048×2048) which I want to crop down to 1077×496. Most of the featured images have this dimension so I wanted to add a function that will crop all of it an display a smaller size on every posts.

Nats E 2 years 2021-12-17T18:31:30-05:00 0 Answers 0 views 0

Leave an answer