Take the New Carousel Mode for a Spin

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 ↩︎

46 Likes

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 Likes

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

7 Likes

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

9 Likes

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:

5 Likes

has this feature been rolled out yet?

1 Like

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

3 Likes

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

1 Like

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 Likes

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 Likes

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 Likes

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!