Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Since migrating to WP 3.5 I discovered that my custom image sizes get ignored - whenever I try and output one of them WP just defaults to the original image instead. Kind of frustrating... Any idea where to start?

functions.php -

add_theme_support( 'post-thumbnails' ); 
add_image_size( 's', 145, 999 );
add_image_size( 'm', 300, 999 );
add_image_size( 'l', 455, 999 );
add_image_size( 'tablet', 1024, 9999 );
add_image_size( 'browser', 1920, 9999 );

The original media sizes in WP admin is set to 0x0. Also tried reseting these in case WP chose to disable image sizes altogether for some reason.

index.php -

// Inside the loop
$size = 's';
$image = wp_get_attachment_image_src(get_field('thumbnail'), $size);
echo $image[0];

The field 'thumbnail' is a custom field I've created. It stores the ID of the attachment.

Edit: This seems to be a bug
http://core.trac.wordpress.org/ticket/22985

share|improve this question
add comment

1 Answer

Try regenerating images for each sizes by using this plugin.

share|improve this answer
    
I've actually tried both that one and the "Ajax regenerate thumbnails" plugin already. No errors, but I suspect the sizes are "unsynced" with the original attachment. –  Staffan Estberg Mar 8 '13 at 9:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.