php - Crop thumbnail images - add_image_size - Wordpress -


i trying add thumbnail crop images, can't work correctly. have faced similar problems earlier, wasn't able solve it.

the page shows latest posts, , since of them has different horatio , size, must use thumbnail crop within functions make them appear same size , correct horatio, , not scale them different.

this code using show latest thumb

<?php if ( has_post_thumbnail() ) { the_post_thumbnail('frontpage_thumb');  } ?> 

within functions.php:

if ( function_exists( 'add_theme_support' ) ) {      add_theme_support( 'post-thumbnails' );      add_theme_support( 'nav-menus' ); }  add_action( 'after_setup_theme', 'mytheme_custom_thumbnail_size' ); function mytheme_custom_thumbnail_size(){     add_image_size( 'frontpage_thumb', 300, 220, array( 'center', 'center' ) ); // hard crop center } 

the problem

they thumbs resize, don't crop. see page.

i have tried regenerate thumb plugin, no result.

have misunderstood "wp cropping"?

the problem appeared related thumbnails wordpress.

to solve problem did following:

  • uninstall thumbnail plugin used
  • install thumbnail plugin
  • regenerate

Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -