Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1414542

    Hi Enfold-Team

    I would like to reduce the size of the post images in the blog.
    I have not found a suitable setting in the Enfold Child “Blog”.
    What is the solution?

    Thanks,
    Beat

    #1414614

    Hi Beat,

    Please add this code in functions.php of your child theme, if you don’t have a child theme then you can use the plugin called WPCode to insert this code 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 );

    Just replace the height and width value, then re-upload your image.
    Hope it helps.

    Best regards,
    Nikko

    #1414645

    Hi Nikko.
    Thank you very much for your suggestion. Unfortunately, I couldn’t see any changes and the post image is still too big in the blog.
    By the way: I use a sidebar in the blog. The code in functions.php refers to entries without a sidebar.

    Best regards,
    Beat

    #1414652

    Hi Beat,

    I apologize, you are correct, it should be entry_with_sidebar not entry_without_sidebar:

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

    Best regards,
    Nikko

    #1414656

    Hi Nikko
    Thank you very much.
    I can’t see any changes in the image size. Not even when I change the height and width values in functions.php. Do you have another suggestion?

    Best regards,
    Beat

    #1414665

    Hi Beat,

    I have checked it again and it seems the code is working but the CSS forces images to use 100% width, that’s why it doesn’t look like it’s working.
    Please add this CSS code in Enfold > General Styling > Quick CSS:

    #top .big-preview img {
        width: auto;
    }

    Best regards,
    Nikko

    #1414716

    Hi Nikko,
    Perfect! It works fine now.
    Thanks for the CSS code.
    Best regards,
    Beat

    #1414721

    Hi Beat,

    I’m glad that we could help you :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Change image size in the blog’ is closed to new replies.