새로운 캐러셀 모드를 만나보세요

Do your pictures get lost within the gridded photo patchwork? Are they awkwardly cutting off crucial bits? Would you like them to be center stage? Despair no more – the feature you didn’t know you wanted has landed!

As the more observational amongst you may have already noticed, we have added a new gallery mode. You can now choose between the classic (masonry) grid and the new, focussed carousel mode. Switching is as simple as selecting the option in the top-right corner of the gallery in the RTE[1] :

Or change the mode name directly in markdown mode:

The toggle to remove the gallery altogether has been moved to below:


Some notes

  • We’re aware the keyboard navigation can be finicky; we’ll improve it in a future update
  • On mobile, swiping gestures are supported – so technically Discourse could become the next dating app[2], truly cementing our “anything goes” flexibility.

  1. Rich Text Editor ↩︎

  2. I’m joking – please don’t actually try this ↩︎

48개의 좋아요

Wow! That’s pretty cool. Seems like Discourse Post Image Carousel is mostly unnecessary now :laughing:.

Out of curiosity, is the carousel made from scratch or built using an existing service, e.g. Splide/Swiper?

6개의 좋아요

It is built from scratch from the ground up, which is extra nice cause it is a glimmer component

7개의 좋아요

Yup, the surest sign of success here is having your TC replaced by something official!!

9개의 좋아요

Nice to see images getting some more love in Discourse!

I literally had the thought to do this for the MVP of a dating project a few years back (I didn’t end up doing it :smile: ). And, let’s be honest, could it really be worse than what’s already out there? :garbage: :fire:

6개의 좋아요

has this feature been rolled out yet?

1개의 좋아요

Yes, I believe it is. You’ll need to update to the latest version.

3개의 좋아요

Is there a limit to how many images can be added to a carousel?

1개의 좋아요

It should work with a lot, I tested it with 20-30.

At some point though it ends up being not that useful cause people will stop clicking.

2개의 좋아요

I am so happy to learn that Discourse has a carousel mode, which lead me to learn that it has a grid (gallery) mode!

I’m a Discourse newbie, still working out the kinks in my migration from phpBB. One of the issues for me has been the provision in phpBB for attachment comments, for which there is no similar provision in Discourse. However, running a ruby script in the import container, I’m able to extract phpBB attachment comments from the mysql database, and assign them - when present - to uploads in Discourse, italicized as shown below:


This is how phpBB looks


This is how Discourse looks after running the ruby script

However - now just learning about grid/carousel mode - I find that applying it wrecks my captions:

I love that a post can be gridded! But the upload comments bear no apparent relation to the upload after applying. What’s curious, is that while text from the post (intended as captions) appear here in grid mode, they don’t appear at all in carousel mode.

I suppose this is a feature request, and should be moved there; because in general, I think the absence of a way to bind a comment to an upload is a serious omission. And it’s particularly manifest, when you grid an existing post.

3개의 좋아요

OK, I’ve added what I think is a reasonable compromise. I ran a ruby script that grids sets of uploads without captions (two uploads or more), and ends the gridding when the first caption is encountered:

I’m happy with this outcome. Gridding certainly reduces the amount of scrolling, and I get to keep my captions. I’m a happy camper! I learned today about a most excellent feature of Discourse. Thanks!

3개의 좋아요

Yeah, the grid layouts are really not meant to handle inserted text between the pictures.

Glad you like it and that you found a workaround for your issue!

[grid mode="carousel"]
[![image|1000x1000](upload://8LYpcymjfalvqGDUTSD04lXPCm8.jpeg)](https://www.meta.discourse.org)
![image|1000x1000](upload://lKxOT3TfVGapss59PBhfeYCs9lW.jpeg)
[/grid]

안녕하세요

이 새로운 기능에 감사합니다! 우리 게시글 중 몇몇에서 유용하게 사용될 것 같습니다.

질문이 하나 있습니다. 이미지의 크기에 상관없이 그리드 캐러셀의 크기는 항상 동일하게 유지됩니다. 캐러셀의 크기를 게시글에서 직접 제어할 수 있을까요? (아니면 테마/컴포넌트 CSS 변경을 통해 해야 하나요?)

또한 이미지에 대한 링크가 더 이상 작동하지 않는다고 가정하고 있습니다.

안녕하세요 – 네, 캐러셀은 서로 다른 크기의 이미지로 슬라이드할 때 변경되는 것을 방지하기 위해 고정된 높이를 가지고 있습니다. 모든 변경 사항은 사용자 정의 CSS를 통해 수행해야 합니다.

2개의 좋아요