How to add thumbnail support to WordPress next / previous post loop?

Wherever you want to place your image:

<?php get_the_post_thumbnail( get_previous_post(), [ 150, 150 ] ) ; ?>
<?php get_the_post_thumbnail( get_next_post(), [ 150, 150 ] ) ; ?>

You can replace the sizes [ 150, 150 ] with the 'thumbnail'.

Edit: The code that works for me:

$next_post = get_next_post();
$previous_post = get_previous_post();

the_post_navigation(
    array(
        'prev_text' => '<div class="post-thumb">' . get_the_post_thumbnail( $previous_post, [ 150, 150 ] ). '</div><div class="post-text"><p class="meta-nav">' . esc_html__( 'Previous post', 'lang' ) . '</p><p class="post-title">%title</p></div>',                        
        'next_text' => '<div class="post-text"><p class="meta-nav">' . esc_html__( 'Next post', 'lang' ) . '</p><p class="post-title">%title</p></div><div class="post-thumb">'. get_the_post_thumbnail( $next_post, [ 150, 150 ] ) . '</div>',
    )
);

error code: 523