| Summary | Add a gallery view for each topic | |
| Preview | Click to see a gallery example | |
| Repository Link | https://github.com/Canapin/discourse-topic-gallery | |
| Install Guide | How to install plugins in Discourse |
Description
Topic Gallery displays all images from a discussion on a dedicated page.
Use cases
Ideal for image-focused communities and/or categories in which users post many pictures.
It allows for a full picture experience without the regular topic interface and other contents getting in the way.
Mobile view:
You can try it here. This is primarily a test instance, so the availability is not guaranteed.
Features
Main features
-
Infinite swiping! [1]
-
User and date filters
-
Starts gallery from a given post
-
Group-specific access
-
Category-based exclusions
-
Link to the source post below the currently open image, so you’re never lost:

-
Shows grouped pictures (belonging to the same post) on mouse over:

Navigation from a topic to a gallery
Several buttons are available to navigate from a Topic to a Gallery:
-
Below the timeline:
-
At the end of a topic:

-
On each post (can be disabled in the settings):

If we open the gallery from a post, the gallery is filtered and only shows images starting from this post. You can cancel this filter with a single click:

Gallery URLs
The gallery URL syntax is the same as a regular topic, but /t/ is replaced with /gallery/:
https://canapin.discourse.diy/t/share-your-pictures/10
![]()
https://canapin.discourse.diy/gallery/share-your-pictures/10
There’s also a public JSON endpoint:
https://canapin.discourse.diy/gallery/share-your-pictures/10.json
Security & queries
- Feature access is restricted to allowed groups and in allowed categories.
- Galleries are restricted to users with access to their source topic.
Uploads queries exclude:
- The order of pictures from a post is preserved
- Non-user-uploaded images
- Non-post references (custom emojis, avatars, etc.)
- Uploads from posts that the current user has no access to, meaning:
- Whispers (if the current user can’t see whispers)
- Hidden posts
- Deleted posts
- Ignored users’ posts
Gallery Behavior
-
Hotlinked images are not shown.
-
Small images are not shown (minimum resolution can be changed in settings).
-
Duplicate images are shown once.
-
Images in quotes are shown.
Settings
| Name | Type | Default | Description |
|---|---|---|---|
topic_gallery_enabled |
boolean | true |
Enable the topic gallery plugin. |
topic_gallery_allowed_groups |
group_list | admins |
Groups that are allowed to access the topic gallery. |
topic_gallery_minimum_image_size |
integer (0–1000) | 64 |
Minimum width and height (in pixels) for images to appear in the gallery. Images smaller than this in either dimension are excluded. |
topic_gallery_excluded_categories |
category_list | "" |
Categories where the topic gallery is disabled. Topics in these categories will not show gallery buttons or the gallery page. |
topic_gallery_post_menu_button |
boolean | true |
Show a gallery button inside each post. |
By default, the plugin is enabled for admins only. Visit settings to enable other groups.
Reaching the end of the first batch of images automatically loads and appends the next batch. ↩︎



