• Hi WordPress Codex,

    Sorry if this is a dumb question. I’m a newbie.

    I’m having trouble with my image thumbnails. The important information in each image is on the upper left, but the thumbnail generates from the center.

    I would re-size the original image but the theme I’m using uses multiple thumbnail sizes, so that won’t work.

    I’ve already gone into wp-includes/media.php and changed the following:

    $s_x = floor( ($orig_w - $crop_w) / 2 );
        $s_y = floor( ($orig_h - $crop_h) / 2 );

    to

    $s_x = 0;
        $s_y = 0;

    then I used the plugin “Regenerate Thumbnails”, which regenerated all thumbnails, but they still seem to be centered.

    The theme I’ve made a child of also has the following in the functions.php file:

    if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
      add_theme_support( 'post-thumbnails' );
      add_image_size('featured-slideshow',959,349,true);
      add_image_size('featured-big',369,408,true);
      add_image_size('featured-medium',369,196,true);
      add_image_size('featured-small',60,58,true);
      add_image_size('featured-blog',306,215,true);
      add_image_size('featured-portfolio',306,387,true);
      add_image_size('featured-side',306,215,true);
      add_image_size('featured-blog-listing',625,152,true);
      add_image_size('featured-port-listing',306,387,true);
    }

    is there an easy way to make a change to the above functions.php in my child theme to fix the problem?

    I’m not sure if this matters, but I’m running multiple sites locally on MAMP.

    Thank you all for your time and help!

  • The topic ‘Featured Image thumbnail resize’ is closed to new replies.