Home › Forums › Support › Change size of page featured image › Reply To: Change size of page featured image
April 14, 2015 at 9:04 am
#98483
dmendana
Hi Tom, sorry to keep bothering you. This is really strange.
My code is:
____at template-tags.php:
<?php the_post_thumbnail( apply_filters( 'generate_page_header_default_size', 'full' ), array('itemprop' => 'image') ); ?>
____at functions.php:
add_filter( 'generate_page_header_default_size', 'generate_custom_default_page_header_size' );
function generate_custom_default_page_header_size()
{
$width = 1800;
$height = 400;
return array( $width, $height, true );
}
I have set featured images way wider than 2000px. This didn’t produce hard cropped images of that size.
Then I did something else. I added a custom image size 1800×400 and regenerated thumbnails. And now the featured images display at the cropped size.
Does this make any sense?
Edit: typo, it’s 2000px instead of 200px