Display post thumbnail after clicking on post id with AJAX

You can start by trying this.

1. Change this <span class="id_53">Display Post Image</span>

to <span class="id_53" data-id="53">Display Post Image</span>

2. Create you js file

$(function () {
    // click event example
    $('.id_53').on('click', getThumb);

    // call the ajax
    function getThumb() {
        $.post( 'http://path/wp-content/themes/your-theme/ajax-file.php' , 'my_id='+$(this).attr('data-id') , showThumb );
    }

    // get image source
    function showThumb(e) {
        $('#img_in').style({'background-image':e});
    }

});

3. Create your ajax-file.php

// for external files
include( '../../../wp-load.php' );

// get your variable
$my_id = intval( $_POST['my_id'] );

// get thumbnail ID
$thumb_id = get_post_thumbnail_id( $my_id );

// get path of thumbnail
$img = wp_get_attachment_image_src( $thumb_id, 'full' );
echo $img[0];