Ok so I tried this and it worked quite nicely. Here is what I did:
-
created a theme and made it a component for my default theme
-
defined an enum setting in the component theme and gave it some values to choose from
-
added this piece of code in Common >> </head>:
<script type="text/discourse-plugin" version="0.4">
api.changeWidgetSetting('post-avatar', 'size', Discourse.ThemeSettings.topic_avatars_size);
</script>
- and this piece in Common >> CSS
.topic-avatar {
width: #{$topic_avatars_size}px; /* from theme settings */
}
And I got this (80px avatars):
Changed the setting to 100px, reloaded the page and got 100px avatars:
My PR for theme settings doesn’t have this - if you want this in I’ll push my changes after I polish my code a bit and write some tests.


