Topic List Previews

David/Nick,

OK I’ve taken another look at the algorithm I was using to choose resolution and made improvements.

This is deployed to the TC and the Plugin.

NB the new resolution scale is 0 - 6 with 0 being the original image, 1 being next highest resolution and 6 being the very lowest.

Please update your plugin/TC and let me know if this resolves the behaviour.

@davidkingham, @internet_cookie thanks for bringing this to my attention.

(David I think this is the problem you are seeing, but I could be wrong).

2 Likes

Thanks Rob, unfortunately that did not fix my problem, still have a conflict with the events plugin. You can see on my production site thumbnails not working on mobile, but with events disabled on my development site they do work.

2 Likes

I can’t see how they ever worked together (TLP plugin included). They are both overriding the mobile topic list item template. That’s a deal breaker. For now you will need to choose between them.

I may experiment with a CSS/plugin outlet only version in the longer term to avoid a template override but that’s not a must-pay-the-bills priority at present.

However the extent of the override that TLP requires to render a Tile may not be possible just using outlets.

1 Like

Bummer, I was excited to get events back finally haha! I find it curious that the Topic Thumbnails theme component does work with the events plugin, I’m not questioning your conclusion just trying to help. It seems that would also be overriding the template? Just to be clear I am talking about pavilion’s event plugin, not the discourse team’s in the calendar plugin.

2 Likes

Because the layout it uses doesn’t require an override of the template. In TLP I’m laying out more stuff and some of it is in nested divs so won’t work in the same way: I have to rely on a template override. Normally this isn’t that risky because it is a leaf node.

2 Likes

Thanks for the fix! I just set a resolution of 4, and almost every tile is now loading 400x400 size thumbnails. So that’s working fine. :clap:

The only exceptions are a few posts with an original image upload of less than 800x800 but more than 400x400. These posts are loading the 200x200 size thumbnail instead of the available 400x400

1 Like

The new algo uses rounding. You probably have to accept some will be switched up or down. This is so I can generalise ‘resolution level’ across sets of different length. The issue might be I’m treating each division as equal but in reality it should be non linear.

Sorry can’t spend more time on this at mo. I may improve it in the future.

2 Likes

Sounds good, thanks for the fixes. I’m happy that we’re loading 400x400 sizes now to reduce our page loads. :+1:

2 Likes

@merefield, first off… thanks for the amazing plugin :pray:

I just wanted to also report that the “topic list default thumbnail fallback” setting does not seem to be working. I’ve set this as our “topic list default thumbnail” but any topic that does not have an image, is not using this fallback image, as illustrated here:

Is there a solution to get the default image to show? I miss the congruence when there was an image or default image for each topic.

One other note… the thumbnails used to show animated GIF’s which we loved. But now it seems it just displays a still shot for the thumbnail, instead of the animated GIF.

One other note: we are also using the Pavilion Events Plugin, which @davidkingham mentioned they are also using.

1 Like

This works in the TC, I used it this week. As for the plugin, I’ll take a look at this in the run up of the next supported upgrade period. Thanks for the report.

Thumbnails are created by Discourse now. Most of the related logic has been removed from TLP. We would need to ask them to support animated GIFs.

Yep, I’ve raised this. This is a template clash. One of my colleagues is looking at it.

1 Like

It should work - I have seen sites using our official theme component successfully with animated gifs. Make sure that the allow animated thumbnails setting is enabled in your site settings. (it is enabled by default)

If it still doesn’t work, feel free to create a new #support topic here with the gif that doesn’t work.

3 Likes

Goooops, missed that setting, David, thanks so much for interjecting!

@jord8on if you get no joy with that I will take a look in first instance in that case. Hit me up with an example in a PM if that doesn’t work for you.

3 Likes

Animated GIF’s are working on our site. I’m not sure what the issue was. Maybe it was something on my local device ¯\_(ツ)_/¯

Thanks for looking into that!!

One more question. I just checked out the official discourse theme component and am wondering what the differences are between that Topic List Thumbnails Theme Component and this “Topic List Previews” plugin? Is one better or worse for certain situations?

2 Likes

I think it’s going to take you less than a minute to decide for yourself? :). TLP TC does what it says on the tin.

2 Likes

This is implemented in the TC, please test this out and revert:


default: OFF

2 Likes

@davidkingham @jord8on I’ve added the missing mobile plugin outlet to the TC that @fzngagan has kindly PR’d into Discourse core (cheers mate!), so you might find things are improved. I’ve not yet tested with the Events plugin though!

Let me know how you get on with Events plugin and the TC:

If you need this in the plugin, let me know.

2 Likes

This helps us so much, because we can now publish and promote content for our members first. Thank you! :smiley:

2 Likes

If we adjust thumbnail resolution or uninstall the TLP plugin, do we need to take any actions to purge the old generated thumbnails? Or will they purge automatically in time?

1 Like

Resolution is just a superficial JavaScript level choice thing.

Good question. Thumbnail generation is a core activity. Try removing and rebaking a Topic and see if they disappear from latest.json

2 Likes

We currently see a discrepancy between the featured images order and the topic order by tag, i.e. the featured topics on https://1e9.community vs https://1e9.community/tag/titelstory?ascending=false&order=created

What exact dimension are the featured images ordered by? Thanks!

1 Like