Previous / next posts using featured image thumbnail as links

From this answer:

Let’s say you want to fetch the ID of the immediately previous post
based on the current post’s ID. This is what you’d do:

get_previous_post_id( $post_id ) {
    // Get a global post reference since get_adjacent_post() references it
    glob al $post;

    // Store the existing post object for later so we don't lose it
    $oldGlobal = $post;

    // Get the post object for the specified post and place it in the global variable
    $post = get_post( $post_id );

    // Get the post object for the previous post
    $previous_post = get_previous_post();

    // Reset our global object
    $post = $oldGlobal;

    if ( '' == $previous_post ) 
        return 0;

    return $previous_post->ID; 
} 

You can do a similar thing to fetch the next post’s ID … and you can do this recursively if you need to
get the previous previous post:

$two_posts_ago = get_previous_post_id( get_previous_post_id( $post->ID ) );