How to implement add_image_size in a plugin

Just call this function in the init action. This action is fired for both frontend and backend. So it should look like this:

add_action( 'init', 'wpse4378_add_new_image_size' );
function wpse4378_add_new_image_size() {
    add_image_size( 'wp_small', 60, 75, true ); //mobile
}

Leave a Comment