Search code examples
wordpressimagecrop

Define a new cropping image size in Wordpress


Inside Wordpress, I need to generate and create inside the upload folder a new cropping image size that has:

  • width=205px
  • height=120px

Inside my function.php here is my code:

// Call function on after setup
add_action( 'after_setup_theme', 'theme_setup_img' );
function theme_setup_img() {
    add_theme_support( 'post-thumbnails' );
    add_image_size('search-thumb', 205, 120, true );
    // set_post_thumbnail_size( 205, 120, true );
}

However, no new image-sizes have been created inside the upload folder (only default WP sizes). Any solution?

Note: I'm using the default theme and the latest WP version


Solution

  • The problem here was the "Dynamic Image Resizer" plug-in. It was breaking my theme with Wordpress 4.0.