Calling product thumbnail( featured image):
Inside loop call this function:
<?php the_post_thumbnail(); ?>
This will display the image itself.
Calling url only:
the_post_thumbnail_url();
With thumbanil size:
the_post_thumbnail_url( ‘thumbnail’ );
with medium size
the_post_thumbnail_url( ‘medium’ );
With full size
the_post_thumbnail_url( ‘full’ );
Calling url inside a img tag:
<img src=”<?php the_post_thumbnail_url(); ?>” alt=”image” class=”img”/>