To fix image ratio issues in a responsive slideshow for mobile, here are a few solutions you can try:
CSS Adjustments with object-fit: One effective method is to use object-fit: contain on the images inside your slideshow, ensuring the images scale properly without being cropped. This works well when you need the images to fit within the container without distortion. You can also set height: auto to avoid fixed height constraints that can cause image cropping.
For example:
css:
<style>
@media only screen and (max-width: 600px) {
.slideshow .banner__media {
height: auto !important;
}
.slideshow .media > image {
object-fit: contain !important;
}
}
</style>