Override default media size and add additional sizes to media gallery

Posted in wordpress

To update default wordpress image sizes add this code to functions.php:

add_theme_support('post-thumbnails');
update_option('thumbnail_size_w', 150);
update_option('thumbnail_size_h', 150);
update_option('large_size_w', 500);

http://wordpress.org/support/topic/how-set-default-image-size

 

To insert a custom image size inside a post or page from the media gallery insert the following filter into the functions.php file:

add_filter( 'image_size_names_choose', 'custom_image_sizes_choose' );
function custom_image_sizes_choose( $sizes ) {
$custom_sizes = array(
'featured-image' => 'Featured Image'
);
return array_merge( $sizes, $custom_sizes );
}

http://wp.tutsplus.com/tutorials/theme-development/using-custom-image-sizes-in-your-theme-and-resizing-existing-images-to-the-new-sizes/