On a responsive site, I have set up flexslider to showcase both landscape and portrait orientation images. The smoothHeight: true
option is enabled to adjust the height according to the images.
However, at the largest media query where the flexslider container is 750px wide, landscape images work well but portrait images become oversized. The width of the portrait image matches the container size, leading to a height that requires scrolling to view the entire image.
I attempted to address this by setting max-height: 750px
in the CSS, which did resolve the height issue. However, flexslider then distorts the image to fit a 750px x 750px square.
Is there a solution to make flexslider maintain the aspect ratio and adjust the width based on the max-height
? This way, portrait images would be 750px tall while preserving their original proportions.