This is my link.php script for show latest title and tumbnail from my wordpress site. Title working fine thumbnail not work. it only show mysite/wp-includes/images/media/default.png, But my content have uloaded image. How can i get thumbnail image
<?php
require('../../wp-blog-header.php');
?>
<?php
$posts = get_posts('numberposts=10&order=ASC&orderby=post_title');
foreach ($posts as $post) : setup_postdata( $post ); ?>
<?php get_the_ID(); echo "<br />"; ?>
<?php the_title(); ?> <?php echo "<br />"; ?>
<?php
$imgId = get_post_thumbnail_id($post->ID);
$imgUrl = wp_get_attachment_image_src($imgId,'thumbnail', true);
?>
<a href="<?php the_permalink(); ?>"><img src="<?php echo $imgUrl[0]; ?>" /></a>
<?php
endforeach;
?>