Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1413263

    Greetings,

    I have been using the plugin Simple Image Sizes in my site. In it, I had the size for “entry_with_sidebar size” set at maximum width 1032, maximum height 900. This gave the featured images in my Enfold blog posts a nice aspect ratio, roughly 1.91:1 for images uploaded at 1200 x 628px.

    Recently, I uninstalled Simple Image Sizes because it now seems unsupported and out of date.

    Without the Simple Image Sizes plugin, the featured images in my Enfold blog posts are now the same width, but significantly reduced in height, such the aspect ratio is significantly changed and the top and bottom of the image are truncated. See:

    https://centerforworldmusic.org/2016/11/mairtin-de-cogain-irish-storyteller/

    How can I get my 1.91:1 aspect ratio back? Is there some CSS code I could add? Basically, as I understand it, I need images that display at 1032px wide and are not constrained as to height.

    Thanks for your advice.

    Lance

    #1413332

    Hi Lance,

    Please add this code in functions.php using a child theme or if you don’t have a child theme, you can use WPCode plugin to insert this php snippet:

    function enfold_customization_modify_thumb_size( $size ) {
      $size['entry_without_sidebar'] = array('width'=>845, 'height'=>321);
      return $size;
    }
    
    add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );

    The width and height values are default, so change it as you see fit.

    I need images that display at 1032px wide and are not constrained as to height.

    please change this part of the code:

    $size['entry_without_sidebar'] = array('width'=>845, 'height'=>321);

    to

    $size['entry_without_sidebar'] = array('width'=>1032);

    Then regenerate your images or simply re-upload the image.
    Hope this helps.

    Best regards,
    Nikko

    #1413367

    Hi Nikko,

    This worked. Thanks so much for your help.

    FYI: I did have to change ‘entry_without_sidebar’ to ‘entry_with_sidebar’

    Cheers! Lance

    #1413393

    Hi,

    Great, I’m glad that Nikko could help you out. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

    #1413414

    It worked. Let’s close it!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Featured Images Messed Up’ is closed to new replies.