How to print post thumbnail url in wordpress



This is a common format for printing Featured image in wordpress

the_post_thumbnail_url();                  // without parameter -> 'post-thumbnail'
 
the_post_thumbnail_url( 'thumbnail' );       // Thumbnail (default 150px x 150px max)
the_post_thumbnail_url( 'medium' );          // Medium resolution (default 300px x 300px max)
the_post_thumbnail_url( 'large' );           // Large resolution (default 640px x 640px max)
the_post_thumbnail_url( 'full' );            // Full resolution (original size uploaded)
 
the_post_thumbnail_url( array(100, 100) );  // Other resolutions


<img src="<?php the_post_thumbnail_url(); ?>"/>




Related Post


Latest Post


Recent Posts Widget

Make sure to never miss a thing...

Get the latest news from the creative industry along with other creative goodies, conveniently delivered to social media.