Crop featured image used as header

  • Author
    Posts
  • #45693

    I have a book review site, and I’ve got Nirvana set to use the featured image as the header. That works fine, but because my images are all portrait orientation, the image takes over the page. Is there a way to automatically crop the image to a certain height (or proportion)? I’ve force-regenerated thumbnails after setting this option, and it didn’t help.

    Website: reviews.metaphorosis.com

    • This topic was modified 4 years ago by Corgrim. Reason: typo
    #45938
    Zed
    Cryout Creations mastermind

    This should not happen. Nirvana registers an image size according to the configured header height and site width options and uses this image size to request the featured images to be used as header images.

    Test out with the Force Regenerate plugin as well if you used a different one (not all regeneration plugins worked as expected in our test)>


    If you like our creations, help us share by rating them on WordPress.org.
    Please read the available documentation and search the forums before posting.
    #45969
    This reply is private.
    #46432
    Zed
    Cryout Creations mastermind

    WordPress’ featured image selection code gives priority to the width and will generally return the first thumbnail that matches (even if it is not the preferred on). This algorithm has the side effect of picking the full size image (or even another crop) when the width matches the desire value.

    I’d test with an image with an original width larger than the needed value of 1200px to see if this mismatch still occurs.


    If you like our creations, help us share by rating them on WordPress.org.
    Please read the available documentation and search the forums before posting.
    #48252

    I tested with an image far greater than the 1200 size (2400), and I still get the full image, not the crop.
    http://reviews.metaphorosis.com/review/rumors-of-spring-richard-grant/

    Website: reviews.metaphorosis.com/review/rumors-of-spring-richard-grant

    #48448
    Zed
    Cryout Creations mastermind

    Disable the theme’s “Force header image responsiveness” option to avoid this.


    If you like our creations, help us share by rating them on WordPress.org.
    Please read the available documentation and search the forums before posting.
    #48485

    Thanks. That works in the sense that it does use a crop of some images as the header. But it screws up the default header on other pages, and some of the featured image headers as well. I’ll just give up on this option. Too bad.

    #48546

    PS I decided to try Anima (for the post title overlay), and in Anima (with no tweaks of any kind), the featured image header works fine. So, problem (inadvertently) solved.

    #48810
    Zed
    Cryout Creations mastermind

    Anima handles the header image differently, so the options behaviour is not the same as in Nirvana.


    If you like our creations, help us share by rating them on WordPress.org.
    Please read the available documentation and search the forums before posting.
Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Crop featured image used as header’ is closed to new replies.