• Resolved digitalisfun

    (@digitalisfun)


    Hi Robin

    Is it possible to increase the minimum size of a featured image that’s shown? I have a site with hundreds of old posts that have featured images that are too small, so I want to increase the minimum size to force the default image to show in the settings. Changing the medium image size in my media settings isn’t possible as I have used these elsewhere.

    Thanks 🙂

    https://wordpress.org/plugins/display-featured-image-genesis/

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

    (@littlerchicken)

    I think it should be possible to add in the ability to do that, although out of the box, the plugin works rather hard to not use really small images. I think my concern would be that the smaller (“large”) images are centered above your post content, and with really small featured images, I felt like that would look somewhat awkward.

    I probably can add in a filter to override that, though–let me see if I can manage it for the next version. I’ll update this and let you know. Thanks for asking!

    Plugin Author Robin Cornett

    (@littlerchicken)

    Yes, looks like it will be possible to do that. If you want to try it, you can download the develop branch of the plugin directly from Github. It’s stable (I was hoping to release very soon). Then you would need to add a filter like this to your site (likely the functions.php file, please make sure you back up, etc. etc.):

    add_filter( 'displayfeaturedimagegenesis_set_medium_width', 'rgc_override_medium_size' );
    function rgc_override_medium_size() {
    	return 100; // 100 is the new width (in pixels) by which WordPress will measure the medium image size
    }

    I’ve tested this locally and it’s working fine–hope it helps!

    Thread Starter digitalisfun

    (@digitalisfun)

    Hi Robin

    Thanks for your reply. I read back over my request and think I may have confused you so let me clarify a bit further before I try out your suggestion. What I’m trying to achieve is to exclude the old featured images as they are too small – instead I just want to show the default featured image in your plugin settings in place of those smaller old featured images. So what I’m after is a way to override the plugin’s functionality that looks at the medium image in media settings and make this value larger to exclude those featured images that are really too small to be shown. Hope I’m making sense 🙂

    Thanks for your help.

    Plugin Author Robin Cornett

    (@littlerchicken)

    Ah, yes, I did misunderstand what you were wanting.

    Good news, though: I think this is still the solution you want, but you would just set the number (100 in the example) to be higher than your medium image width, or whatever size your too-small images are. So on my local site, I set this number at 600, and a featured image which was 580px wide was not displayed by the plugin, but the site’s default image was, which I think I understand now is what you want, right.

    Hope that helps!

    Thread Starter digitalisfun

    (@digitalisfun)

    Worked a treat! Thanks Robin. Much appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Possible to increase the minimum size to show a featured image?’ is closed to new replies.