Adding title and description to subpage’s featured image

I found how it could be done!
Instead of using that function it was possible to add a query and another function.
This is the code goes in the page.php file.

                <?php $subs = new WP_Query( array( 'post_parent' => $post->ID, 'post_type' => 'page', 'meta_key' => '_thumbnail_id' ));
    if( $subs->have_posts() ) : while( $subs->have_posts() ) : $subs->the_post();
    echo '<div class="re-featured-image child-thumb">' . get_the_post_thumbnail($post->ID, 'index-thumb', array('class' => 'img-responsive', 'id' => 'img-center'));
    echo '<div class="re-featured-image-title">' . get_post(get_post_thumbnail_id($post->ID))->post_title . '</div>';
    echo '<div class="re-featured-image-caption">' . get_post(get_post_thumbnail_id($post->ID))->post_excerpt . '</div>';
    echo '<div class="re-featured-image-description">' . get_post(get_post_thumbnail_id($post->ID))->post_content . '</div></div>';

    endwhile; endif; wp_reset_postdata(); ?>

If you want your thumbnail to link to it’s page
add this function in the functions.php file. I found the code here http://wordpress.org/support/topic/making-post-thumbnail-link-to-post

add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 );

function my_post_image_html( $html, $post_id, $post_image_id ) {

$html="<a href="" . get_permalink( $post_id ) . '" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>';

return $html;

}