wordpress add image size code example
Example 1: 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 ) );
Example 2: 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' ) );