[Support request] Customizing Feature Image Sizes

Home Forums Support [Support request] Customizing Feature Image Sizes

Home Forums Support Customizing Feature Image Sizes

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1389787
    Philip

    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.

    #1390246
    Tom
    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 🙂

    #1467517
    Howard

    Hi:
    Is there an ideal feature image width or would that depend on the size (width) of your designated content area of the customizer? E.g. If you use 2 sidebars on homepage and 1 on the blog post, would the ideal image width For your post be the actual size of the width you set for your content (in pixels?
    Howard

    #1467709
    Leo
    Staff
    Customer Support

    Hi Howard,

    You are exactly right!

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