<?php
if(!defined('ABSPATH')) exit;

if (has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>">
    <?php the_post_thumbnail('large'); ?>
</a>
<?php else : ?>
<a href="<?php the_permalink(); ?>">
    <img src="<?php echo get_template_directory_uri(); ?>/assets/img/noimage.png" alt="<?php the_title(); ?>">
</a>
<?php endif; ?>