• Resolved Marty

    (@bozzmedia)


    Great plugin, thank you! Occasionally we use smaller images and would like to blow them up a bit to fill the space. This seems to be how the backstretch feature works, however if we use certain size images, in this case it’s 1197 x 500, the layout breaks up. The featured image is not stretched and it is not placed in the same area of the template with the overlaid post/page title.

    Is there a way to adjust this / manage this aside from using larger images? Ideally it would stretch whatever image we give to it.

    Thanks!

    https://www.ads-software.com/plugins/display-featured-image-genesis/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Robin Cornett

    (@littlerchicken)

    Yes, this is intentional behavior. The decision to backstretch an image or not is linked to the size of the Large images set under Settings > Media (default is 1024, so anything larger than 1024 pixels wide will backstretch–my guess is that your theme has a larger number for the large image setting?). It’s to prevent images that are too small from being stretched too much.

    That being said, there is a way around it if you are willing/able to add a bit of code to your site. Just please make sure you’ve backed up your files, don’t edit in the WP editor, and practice safe coding. This can go in your functions.php file or wherever you keep similar code:

    add_filter( 'display_featured_image_genesis_set_minimum_backstretch_width', 'prefix_change_backstretch_width' );
    function prefix_change_backstretch_width() {
    	return 400;
    }

    This is an exaggerated number–but it will tell the plugin to backstretch any image over 400 pixels wide. Setting this number too low will result in sad cases of pixellation, but if your large image size is set fairly high, then this may be helpful for you. Hope this helps–

    Thread Starter Marty

    (@bozzmedia)

    Brilliant, Robin. Thank you for the fast reply and code snippet to boot. You rock!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No backstretch when using smaller images’ is closed to new replies.