show first 3 thumbnails of posts in different sizes [closed]

When you are in the loop, you can access the current loop item’s index by using the current_post method. You didn’t post any code, so I’m just going for a simple demonstration.

If ( have_posts() ) {
    while( have_posts() ){
        the_post();

        // Setting the global $wp_query to access the method
        global $wp_query;

        // Get the current post's index
        $current_post = $wp_query->current_post;

        // Let's calculate the thumbnail size based on the current post's index
        switch ( $current_post ) {
            case 1 :
                $size="size-1";
                break;
            case 2 :
                $size="size-2";
                break;
            default :
                $size="post-thumbnail";
                break;
        }

        // Now we have the proper thumbnail size
        the_post_thumbnail ( $size );

    }
}