[Support request] Customizing Feature Image Sizes

Home Forums Support Customizing Feature Image Sizes

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1389787

    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:


    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.

    Lead Developer
    Lead Developer

    Hi there,

    Yes, whenever a size is changed (or added), thumbnails must be regenerated in order for WordPress to build the new sizes – it doesn’t do it automatically, unfortunately.

    Let me know if you need more info 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.