Topic List Previews

I set tag ok for topic featured images tag and set topic list featured images count 5

I have new post and i custom post this is tag ok. But not show on topic featured

But old post in same categories con show.

Looks like a bug (or half-baked implementation), added it to the list! :smiley: Thanks or reporting.

1 Like

No, unfortunately not, it’s a semi-global setting, this one:


If you set this all non-category, non-topic routes will get the featured images.

Might consider making this more granular if sponsored.

Good catch, it’s a bug! Added to the ‘list’. Thanks for reporting.

Can take 5 minutes before it shows as thumbnail is only baked in a job that runs up to 5 minutes later. (bizarrely you can resolve that by setting minimum width and minimum height to both zero which results in an almost instantaneous baking - known issue).

Things to check and confirm:

  • does it appear now?
  • check that ‘hotlinking’ is disabled. If enabled it blocks thumbnail generation (which unfortunately stops featured images being created). Known issue.

Yes I disable topic list hotlink picture of post issue can show.

But makes categories at Use topic image_url in thumbnails pictures. fail

I try resize picture issue. It work. Now can show. thank you.

1 Like

Great! I’m using News Plugin made by Angus and its showing there too. Can I PM you to discuss about sponsored it?

1 Like

I installed the plugin, but on its settings page there is only one check-box “Enable Topic List Previews plugin”. Should not there be more options? How to configure it?

There should be many more settings than that! :slight_smile:

There should be a setting for tiles, thumbnails, excerpts etc. For each one of these you should see a multi-select list. You need to add the route to the list in order for the setting to be active in that discovery route.

E.g. adding ‘Latest’ to topic list thumbnail setting will ensure the thumbnails show up in Latest.:

1 Like

Search “Topic list” in your settings. It’ll pull up all possible settings.


I think confusion comes from the fact that on /admin/plugins page if you click on Settings for TLP plugin, you only get one option - to enable TLP, but not all other settings. It searches for topic_list_previews, which does not find all settings…


Good catch @Lure :slight_smile: The quick hack is to reduce the URL filter parameter to topic_list_ :wink:

1 Like

Another interesting “missing thumbnail case”:

Thumbnail shown for logged-user:

But not for anonymous user (on same Chrome/Mac, just in Incognito mode):

Note: also avatar T is missing here!

Thank you all for the tips! Now, is there a plugin that would show an excerpt of one one of the answers to the topic?

I’ll have to ask @angus why he set it up this way. Unfortunately Discourse uses the variable names as a means to determine what is displayed as the setting name. I suspect calling the settings topic_list_previews_SETTING would lead to rather too long setting names and the column is fixed width. “topic list blah” is snappier but renders the settings button useless as you point out.

Also changing this now would probably destroy all existing site settings for all upgraders.

The hack

There is a hack: calling the enabling setting topic_list__enabled fixes the issue but is a bit opaque!:

  • Anyone reading the code would have little idea why this was done! Might still sneak it in though :wink:

  • And you get this:

    confusing much?

A new tiles ‘renderer’

Guys, I’ve not been 100% happy with the use of masonry for the tiling system in tiles view. There’s various glitches, challenges with media queries, an inability to theme how many columns you want (but see this post) and A LOT of javascript involved, so whilst I was looking for a way of accommodating sidebars out-of-the-box, I decided to try out a technique I read about in a blog post a while back:

I’ve now coded this into an experimental version of this plugin. I have it running on two sites at the moment and it seems fairly stable.

If you’d like to try out the new renderer and let me know what you think, change your app.yml and replace the existing TLP clone command with this:

git clone -b "replace_masonry_with_CSS_grid"

Admin control over number of columns

This was always a challenge with Masonry and I never quite cracked it so you could Theme customisations locally in a way that allowed a default behaviour out-of-the-box for novices, that more expert admins could override.

This version will render three columns out of the box, reduced to 2 columns if you have a reasonably sized side-bar.

But this version gives you more control:

If you add this CSS in your Theme, it will render only one with a sidebar:

.tiles-grid-item {
   grid-column-end: span 2;

If you have no sidebar and want only one column you can experiment with increasing that span to 3.


I tried it out on my sandbox and it seems to work well. The only negative I see is that on a slow connection it gets a little messy while loading. Not a big concern if thumbnails are coming soon… :wink:

1 Like

Got a weird issue going on in categories where I’m not showing topic list previews. The issue goes away when I disable the TLP plugin.

Clicking on the number under the Replies column briefly shows the topic-entrance navigation (below), but then it immediately redirects to the home page before the user can use that topic-entrance navigation.


We’re on v2.3.0.beta5 +117 and 0.4 of Topic List Previews.

Is this a known issue? Can be reproduced on our site:

1 Like

David I should have something for you along those lines to try out by end of day … will PM.

1 Like

Yay, new feature: Thumbnails that retain aspect ratio!

Pleased to announce a new feature (intended mainly for tiles view) which optionally allows you to render thumbnails that retain their original aspect ratio.

Who’s it for?

The feature is mainly intended for those running TLP tiles on image heavy sites, especially those sites who’s users tend to upload large images to Topics, rather than one-box. Using thumbnails speeds up time-to-interactive and can considerably reduce network load. I’ve halved the time it takes to load one of my sites with this.


Up until today you had to hotlink all images to retain aspect ratio in TLP. This new feature will allow you to render and store un-cropped, undistorted thumbnails locally and avoid hotlinking to the originals and may provide a significant performance benefit. It should be particularly useful for image heavy sites. It should make Tiles view more viable for more sites now.

How to use it

With the update you will now have the option to pick just the thumbnail width resolution and height will be calculated for you if you set it to zero, thereby maintaining the aspect ratio. If you set both Width and Height to non-zero numbers, nothing changes to prior behaviour.

Like so:

This will create two thumbnails, one with width 200 for standard res displays and one with width 400 for retina displays. The height will depend on this and the original image’s width/height ratio.

Be sure to switch this off:

(Finally! :slight_smile: :sweat_smile:)

Now for the rebake

For the change to take effect for existing posts you need to ‘rebake’ them. You can rebake posts individually by selecting “Rebuild HTML” from the admin wrench control menu below the first post:


OR: you can rebake all or a subset of your posts using the console.

Thanks to @davidkingham for testing this. He’ll forgive me if I quote him:

“I’ve been playing around with different thumbnail widths and think 400 will be the sweet spot, 200 looks terrible on a phone. 600 would cover all screen sizes but the file size is still quite large.”. Given David’s (rather beautiful) photography forum is very image heavy indeed, this is pertinent advice.


NB This will work on non-tiles views but I’m not sure the layout effect is desirable.

Donations for the ongoing support of this plugin are very much appreciated (Select Topic List Previews). If you have an account on Angus’ site you automatically get displayed as a backer. Thanks for your consideration.

Known issues and enhancement requests are up-to-date on the repo.

@angus @thwright