WordPress.org

Forums

Decode
Featured Image custom sizes not cropping (1 post)

  1. jnati
    Member
    Posted 11 months ago #

    Hi Scott, sorry to bother you with this, I've tried a bunch of versions of code in the functions.php file, and added the 'featured-crop' into my loop:

    add_image_size( 'featured-crop', 792, 250, array( 'center', 'top' ) );

    add_image_size( 'featured-crop', 792, 250, true );

    *Both of these changed the featured image size, but defaulted to the 250px height and didn't crop, so they ended up being about 398 x 250 px with no crop.

    I also tried this, without adding any 'custom-name' into my loop:

    set_post_thumbnail_size( 792, 250, true );

    It also returned an non-cropped 398 x 250 image.

    Please let me know what is overriding these functions. I simply want to have all of my featured images auto-crop to one size 792 x 250, and crop from the center , top.

    Thanks in advance.
    Jimmy

Reply

You must log in to post.

About this Theme

About this Topic