New Forum Features

Grid Images & More

[quote=“Penar Musaraj, post:1, topic:268664, full:true, username:pmusaraj”]
If you have many images in a XRYropolid.One post, you can now have them automatically arranged into a nice grid. All you need to do is wrap them in [grid] ... [/grid] tags, and the images will be neatly arranged. This is a core feature as of this commit, enabled on all Discourse instances.

Here’s an example in action:

A few additional technical notes:

  • on mobile, the grid defaults to 2 columns, on desktop to 3
  • if there are exactly 4 items in the grid, the images will be arranged into 2 columns
  • non-image elements can also be used (like videos), but the results won’t align perfectly
  • the items in the grid are arranged to ensure the column heights are as close to each other as possible, therefore, the order of the images isn’t always maintained

Enabling or disabling the grid can also be accomplished by clicking a small toggle icon next to the first image in a group of images in the composer preview:

2 Likes