jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Adjust tiled gallery height to one big image

Open ghost opened this issue 12 years ago • 12 comments

Would be great if the height of the tiled gallery could be adjusted, so that one can has full width gallery, but e.g. on the left side one image and the others on the right side of it, smaller and all together maximum the height of the big one. Think that would look great if you can have an article heading above the gallery and under it goes the main article text. Look at this scribble to see what I mean... tiled-gallery-width

ghost avatar Jan 17 '14 19:01 ghost

Very nice idea. I have a question though. What happens if I have 154 images in my gallery?

The implementation of this isn't hard at all, but it wouldn't scale beyond 5-10 photos and the first one cannot be landscape.

dzver avatar Mar 18 '15 22:03 dzver

Thanks for your reply. I thought that this would be an option for small galleries nice to have, as you said. Currently you cannot set a fixed height value for the gallery (especially with smaller ones) right? So this might be the answer, to have one photo to which the others around are adjusting. Depends on how wide the landscape would be. Than there is the option to only show the landscape image in one line and below the others that aren't landscape. It would be great if you could implement this function.

ghost avatar Mar 19 '15 06:03 ghost

Could you give an example of a theme that will benefit of this kind of galleries?

If you fix the height, the width will become variable. So the screen will need to be infinitely wide.

dzver avatar Mar 19 '15 08:03 dzver

A problem I experience sometimes with the fixed width is that Jetpack creates very high images but meanwhile puts some images in another line that would fit in one row if some images would be smaller in a whole. Maybe you know a solution to this issue?

ghost avatar Mar 19 '15 15:03 ghost

When #1799 gets merged, the mosaic tiles will be way more balanced.

dzver avatar Mar 19 '15 16:03 dzver

Okay, looking forward to new version. Thank you for replying!

ghost avatar Mar 19 '15 16:03 ghost

Closing this issue since #1799 was added to Jetpack 3.5.

jeherve avatar Aug 10 '15 15:08 jeherve

In what way was this added? I am trying to adjust height of a gallery to be always the height of the gallery containing container.. any tips?

s-a-s-k-i-a avatar Jun 24 '18 18:06 s-a-s-k-i-a

As you can see here, it wasn't really added in the way it was initially requested. The galleries just got more diverse in shapes. They are pretty predictable, and if you keep a certain amount of images in them, they will stay the same height. How are you trying to have them the same height as the container, though?

zinigor avatar Jun 26 '18 09:06 zinigor

Well that is exactly my question.. would be a good thing to be able to set them to container height value automatically...

s-a-s-k-i-a avatar Jun 26 '18 16:06 s-a-s-k-i-a

In my opinion it is more a theme territory to adapt galleries to a certain location. We can't be sure where the gallery is used, and we didn't plan to look into adding that option. That's why I'm asking - what use case do you have in mind for that? And more importantly, how do you think it will work? Code wise would it be JS or CSS? How would it react to viewport resizing, how would it look on mobile devices?

zinigor avatar Jun 27 '18 10:06 zinigor

It would be a js solution I suppose and I think this would be the most handy solution for anyone who'd love to fit the jetpack gallery into a certain "box". A simple "force to fit surrounding container"-skript - no matter the viewport sizing, which would be applied if the jetpack gallery shortcode was placed with f.e. "fitme" attribute.

The size (height and width) of the container could vary, depending on given theme css.

Usecase example: there are two columns of equal height. col 1 contains some text. col2 contains jetpack tiled gallery with "fitme" attribute. result: perfect look. result without fitme: gallery will never fit the height of the column perfectly and thus it will look odd.

s-a-s-k-i-a avatar Jun 27 '18 10:06 s-a-s-k-i-a