I'm tearing my hair trying to get additional image sizes appear in the media section when i upload new pictures. It works on older versions of wordpress but i can't get it to work on v 3.5.2
Here's my code in the functions.php file and i'm using the underscores.me framework to build the theme.
/*
Custom image sizes
*/
add_action('after_setup_theme', 'images_setup');
function images_setup() {
add_theme_support('post-thumbnails');
if (function_exists('add_image_size')) {
add_image_size('slider', 1170, 400, true);
}
// Getting these sizes to appear in the media section within wordpress
add_filter('image_size_names_choose', 'my_custom_image_sizes');
function my_custom_image_sizes($sizes) {
$custom_sizes = array(
//'custom-post-thumbnail' => 'Custom Post Thumbnail',
'slider' => 'Slider'
);
return array_merge($sizes, $custom_sizes);
}
}