Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1066144

    How can I get the image that has a tall aspect ratio to display in a Gallery Image content block to vertically align to display the the top of the image – not the center.

    See the second thumbnail at https://affiliations.si.edu/about-us/affiliate-directory/

    Thanks!

    #1066343

    Hey galpinr,

    Try adding this code in functions.php and upload the tall image again and use it:

    add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );
    
    function enfold_customization_modify_thumb_size( $size ) {
      $size['portfolio'] = array('width'=>495, 'height'=>400, 'crop'=>array( 'center', 'top' ));
      return $size;
    }

    Best regards,
    Nikko

    #1066538

    Hi Nikko,
    Thank you – that code does fix the vertical alignment issue. Excellent!

    • This reply was modified 5 years, 10 months ago by galpinr.
    #1066726

    Hi galpinr,

    Glad that we could help :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Vertical Alignment of Gallery Images’ is closed to new replies.