user2360003
user2360003

Reputation:

Wordpress not correctly cropping thumbnails

I have Thumbnails and sizes enabled as so in functions.php:

add_theme_support( 'post-thumbnails' );
add_image_size( 'post-thumbnail', 150, 150, true );
add_image_size( 'featured-thumbnail', 360, 300, true );

They are correctly called in the loop, and although crop is set to true, I have yet to see any image cropped to the specified sizes, they all do it "seemingly" proportional. I regenerate the thumbnails every time I make a change and nothing works. I've searched a lot for the answers and there are almost no fixes (I don't want to have to use a plugin and do it manually).

Any ideas?

Upvotes: 1

Views: 2886

Answers (1)

Krunal Shah
Krunal Shah

Reputation: 2101

Please try this one:

if ( function_exists( 'add_image_size' ) ) { 
   add_image_size( 'post-thumbnail', 150, 150, true );// please give another name if its not major requirement of this
   add_image_size( 'featured-thumbnail', 360, 300, true );// please give another name if its not major requirement of this
}

Thanks.

Upvotes: 5

Related Questions