Where to begin.. I recently moved my blog over from shared hosting (ipower) to Amazon EC2. I'm loving the control that EC2 offers, but I've definitely had to deal with my share of bugs from the migration. Most of them I've been able to resolve, but this one is tough. The post thumbnails are the wrong size. This functionality works fine on the old site but is completely broken on the new site. Consider this example:
OLD SITE:
<div class="thumb shadow_600"><a href="http://oldsite.MYDOMAIN.com/dev/?p=4"><span></span><img width="600" height="250" src="http://oldsite.MYDOMAIN.com/dev/wp-content/uploads/2013/03/styleofeye11-600x250.jpg" class="fadeover wp-post-image" alt="styleofeye1" title="test" /></a></div>
<br class="clear" />
NEW SITE:
<div class="thumb shadow_600"><a href="http://MYDOMAIN.com/dev/?p=9"><span></span><img width="428" height="250" src="http://MYDOMAIN.com/dev/wp-content/uploads/2013/03/styleofeye1.jpg" class="fadeover wp-post-image" alt="styleofeye1" title="test" /></a></div>
<br class="clear" />
Notice how the width of the image is off on the new site.
Functions.php
// POST THUMBNAILS
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 200, 200, true);
}
if ( function_exists( 'add_image_size' ) ) {
add_image_size('big_size', 920, 360, true);
add_image_size('single_size', 600, 350, true);
add_image_size('blog_size', 600, 250, true);
add_image_size('half_size', 600, 250, true);
add_image_size('medium_size', 280, 160, true);
add_image_size('small_size', 200, 150, true);
add_image_size('square_size', 183, 183, true);
}
homepage-blog1.php (snippet that adds the thumbnail image)
<?php if($image) { ?><div class="thumb shadow_600"><a href="<?php the_permalink();?>"><span></span><?php $attr = array('class' => "fadeover", 'title' => get_the_title() ); the_post_thumbnail('blog_size',$attr);?></a></div><?php } ?>
I am totally at a lost. I am running the latest version of WordPress (3.5) on both servers. Any ideas? Thanks.