Sometimes you’d like to change the default thumbnail (or Medium/Large) images dimensions when the user is switching to your WordPress theme. The default setting for a thumbnail is 150x150
pixels.
If you want the thumbnail dimensions automatically updated once the user activates your theme, paste this code to your functions.php
file:
/**
* Set some things when the theme is activated
*/
if ( ! function_exists( 'your_theme_activated' ) ) {
function your_theme_activated() {
// set thumbnail size in settings > media
update_option( 'thumbnail_size_w', 100 );
update_option( 'thumbnail_size_h', 75 );
}
add_action( 'after_switch_theme', 'your_theme_activated' );
}
Happy WordPressing! 🙂