<?php
if ( true == get_theme_mod( 'archive_featured_images', true ) ) :
if ( has_post_thumbnail() && ( get_the_post_thumbnail() != '' ) ) :
echo '<a class="featured-image" href="'. esc_url( get_permalink() ) .'" title="'. the_title_attribute( 'echo=0' ) .'">';
echo '<span itemprop="image" itemscope itemtype="https://schema.org/ImageObject">';
$title = get_the_title();
the_post_thumbnail('mudra-featured-image', array(
'alt' => $title,
'title' => $title,
) );
$mudra_image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'mudra-featured-image' );
echo '<meta itemprop="url" content="' . esc_url( $mudra_image[0] ) . '">';
echo '<meta itemprop="width" content="' . esc_attr( $mudra_image[1] ) . '">';
echo '<meta itemprop="height" content="' . esc_attr( $mudra_image[2] ) . '">';
echo '</span>';
echo '</a>';
endif;
endif;
?>