I’m using a Header Element for my blog posts, and having an issue getting the featured image the size I need it. In the Element, I’m using:
{{custom_field._thumbnail_id}}
In functions.php, I added:
add_filter( 'generate_hero_thumbnail_id_size', function() {
return 'large';
} );
This works as expected. However, I then went to Settings > Media and updated my “large” media size, but on the frontend, the size never changes. Do I need to regenerate my thumbnails or something?
I also tried creating a custom size to see if I could get around this. I tried:
add_action( 'init', function() {
add_image_size( 'blog-featured-image', 2560, 1100, true );
} );
add_filter( 'generate_hero_thumbnail_id_size', function() {
return 'blog-featured-image';
} );
But that must be an invalid approach because it doesn’t seem to work at all.
Ultimately, what I’d love to be able to do is specify two slightly different featured image sizes for each of my two Header Elements, if that’s possible.