Image Carrousel - Keep Aspect Ratio - Forum | JoomShaper
Solved SP Page Builder

Image Carrousel - Keep Aspect Ratio

Asked by Stephane Hanrez 3 months ago Last activity 3 months ago

Hello,

When adding an image carroussel on an SPPB page, is there any way to configure it in such a way that it doesn't modify the aspect ratio of my images ?

At the moment, I have to set an height, and a number of images, and it tries to fit the amount of images into the height + width of the section, which result in image distorsion. I would prefer to have it keep the original aspect ratio of the image, and ideally auto-adapt the amount of images to the width of the browser. I don't care if the images are cropped on the 2 extremities at some point as it's a carrousel anyway.

Any way to achieve that ?

Thanks

Accepted answer

Marked as the solution
Ofi Khan Staff

Hello Stephane Hanrez,

Thank you for reaching out to our technical support forum. I’m sorry to hear about the trouble you’re experiencing.

Please use this CSS to
Template Options -> Custom Code -> Custom CSS

.addon-root-image-carousel .sppb-carousel-extended-item img {
    height: initial;
}

It will keep the original height of the image.

Best regards

Stephane Hanrez Asked this

perfect thanks a lot

Ofi Khan Staff

You are welcome 😊

Log in to reply.