# Returning Topic User avatar template with RSS feed

**URL:** https://meta.discourse.org/t/returning-topic-user-avatar-template-with-rss-feed/69354
**Category:** Development
**Created:** [September 4, 2017, 10:41pm UTC](https://meta.discourse.org/t/returning-topic-user-avatar-template-with-rss-feed/69354 "2017-09-04T22:41:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [September 4, 2017, 10:41pm UTC](https://meta.discourse.org/t/returning-topic-user-avatar-template-with-rss-feed/69354/1 "2017-09-04T22:41:07Z")

</div>

Could `topic.user.avatar_template` be returned with the latest and top RSS feed? It’s possible to get it with a API call, but it’s an expensive query if you’re looping through multiple items. There might be a more standard way of doing it, but this seems to work:

```plaintext
// list.rss.erb
// ...
        <% avatar_template = topic.user ? topic.user.avatar_template : "" %>
        <item>
          <title><%= topic.title %></title>
          <dc:creator><![CDATA[<%= "@#{username}#{" #{name}" if (name.present? && SiteSetting.enable_names?)}" -%>]]></dc:creator>
          <dc:avatar_template><%= "#{avatar_template}" -%></dc:avatar_template>

```

I’m turning the RSS feed into something like this:

 ![12](https://global.discourse-cdn.com/meta/original/3X/8/9/896f129b91215619e874217b0d5993f274b172cd.png)

Edit: I’ve looked into this a bit. Custom tags should be added to the `discourse` namespace, not the `dc` (Dublin Core) namespace.

This should be valid, but will only be recognized by a feed reader that’s written specifically for Discourse.

```plaintext
<discourse:avatarTemplate><%= "#{avatar_template}" -%></discourse:avatarTemplate>
<discourse:postsCount><%="#{topic.posts_count}" -%></discourse:postsCount>

```
