add image size thumbnail wordpress code example
Example 1: create custom image size wordpress
add_image_size( 'custom-size', 220, 180 );
add_image_size( 'custom-size', 220, 180, true );
add_image_size( 'custom-size', 220, 220, array( 'left', 'top' ) );
Example 2: adding custom featured image size in wordpress
the_post_thumbnail();
the_post_thumbnail( 'thumbnail' );
the_post_thumbnail( 'medium' );
the_post_thumbnail( 'medium_large' );
the_post_thumbnail( 'large' );
the_post_thumbnail( 'full' );
the_post_thumbnail( array( 100, 100 ) );