Forums

How to work with the_post_thumbnail() ? (2 posts)

  1. Fillipe
    Member
    Posted 1 year ago #

    Hey guys.

    I'm getting some trouble to work with the_post_thumbnail() function. The problem is that I can't resize the image to the siza that I want to. I'm trying to resize a big image to 660px x 330px, but it's not working. I tried:

    1) the_post_thumbnail( array( 660, 330 ) );
    2) add_image_size( 'slider', 660, 330 );
    3) add_image_size( 'slider', 660, 330, true );

    Nothing works. Any idea?

    Thanks!

  2. Kharis Sulistiyono
    Member
    Posted 1 year ago #

    By default WordPress provides abilty to setup Thumbnail size manually via WordPress Admin. You can go through Settings > Media. Then specify Thumbnail size as width : 600 , height : 300.

Topic Closed

This topic has been closed to new replies.

About this Topic