Keeping Thumbnails Same Height in Slider
Permalink Browser Info Environment
Thank you for this addon. If you scroll down the home page ofhttp://indigocharlotte.com/ you will see your gallery in action as a Slider. All the images in the gallery are 600 pixels in height, and I need them all to display at full height, regardless of their width. I have tried leaving the dimensions blank in the Settings, and also used just the 600 pixel height setting and left the width blank. The vertically-oriented images display fine, but the wider horizontal images all shrink, rather than display at their full image size (600 pixel height). This won't work if I can only use images with the same aspect ratio, so I appreciate your help. Thanks.
Type: | Pre-Sale |
---|---|
Status: | In Progress |
Thanks, but if I click "Crop," it requires height and width—and while they are the same height, they aren't the same width. I don't want to crop the images—I just need each image to display at its actual dimensions.
Do you want to achieve variable width of slides (so most right slide will be partially visible)? Like in:
https://swiperjs.com/demos#slides-per-view-auto...
Currently, only fixed/even width of of columns is possible. So that requires cropping or images having same dimensions.
https://swiperjs.com/demos#slides-per-view-auto...
Currently, only fixed/even width of of columns is possible. So that requires cropping or images having same dimensions.
Yes, I need variable widths. So, while this is a great addon, it is apparently useless for what I need.
I'll take a look it later, check if it is easy to implement and let you know.
Cheers
Cheers
That would be awesome. Even if it turns out to be too much to be worth the time, I appreciate your looking into it.
You can try replace those lines in package folder:
a) line 69, 74, 79
packages/grand_gallery/blocks/grand_gallery/js_files/swiper.js
b)line 74
packages/grand_gallery/blocks/grand_gallery/view.php
Set thumbnail height (leave width empty).
Let me know how it behaves/looks (especially on mobile).
If everything is ok, I can implement it in package.
a) line 69, 74, 79
packages/grand_gallery/blocks/grand_gallery/js_files/swiper.js
slidesPerView: 'auto',
b)line 74
packages/grand_gallery/blocks/grand_gallery/view.php
<?php if ($templateName=='slider'): ?><div class="swiper-slide" style="width: auto;"><?php endif; ?>
Set thumbnail height (leave width empty).
Let me know how it behaves/looks (especially on mobile).
If everything is ok, I can implement it in package.
Thanks!
Perfect on desktop.
Still reducing the horizontal images on mobile. (iPhone—I haven't checked a teblet yet.)
Perfect on desktop.
Still reducing the horizontal images on mobile. (iPhone—I haven't checked a teblet yet.)
Haven't tested it on iPhone yet though. But on other mobile browsers it behaves like on desktop,
Be sure, page is not cached on your phone browser (what I think is probably happening).
Be sure, page is not cached on your phone browser (what I think is probably happening).
You are correct. (I clear my cache on desktop regularly but somehow forget about that on my phone.) This is marvelous, and I am so appreciative of your efforts. Thank you!
In version 2.4.0 you can set this option when editing block in:
"Texts" -> "Slider - Slides per view auto"
"Texts" -> "Slider - Slides per view auto"
Most likely, you should check "Crop" next to image dimensions.