# Letter avatar generation issue (non-standard size only)

**URL:** https://meta.discourse.org/t/letter-avatar-generation-issue-non-standard-size-only/39646
**Category:** Bug
**Created:** [16.Февраль.2016 01:01:38 UTC](https://meta.discourse.org/t/letter-avatar-generation-issue-non-standard-size-only/39646 "2016-02-16T01:01:38Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [16.Февраль.2016 01:01:38 UTC](https://meta.discourse.org/t/letter-avatar-generation-issue-non-standard-size-only/39646/1 "2016-02-16T01:01:38Z")

</div>

On latest -2.

So, I’m having an issue with my forum’s letter avatars. I’m currently using larger than normal avatars for topics via this bit of code in `</head>`:

```plaintext
<script type='text/x-handlebars' data-template-name='post/poster-avatar.raw'>
{{!-- Script: replace user avatar with 70px version --}}
<a href="{{post.usernameUrl}}" classNames="trigger-user-card {{classNames}}" data-user-card="{{post.username}}">{{avatar post imageSize="70"}}</a>
</script>

```

With the “avatar sizes” setting in admin/settings/files updated to include 70, this has been working without issue for quite a while now (6+ months), but new users aren’t getting the size 70 avatars generated now. I just noticed this today, but we don’t have a frequent new users so I’m not certain how long this has been an issue.

The url for an example of the problem avatars is here: [http://sih.onemadogre.com/letter\_avatar\_proxy/v2/letter/l/49beb7/70.png](http://sih.onemadogre.com/letter_avatar_proxy/v2/letter/l/49beb7/70.png)

When you click on that link, it says “an unhandled lowlevel error occured. The application logs may have details.” But that appears to just be what it says whenever you swap the avatar size at the end of the url with anything not available by default (e.g., switch 70.png to 60.png and it works, switch it to 86.png and the same error pops up). So the letter avatar is properly generated every except here, I can see the new user’s avatar in the Latest listing, on their profile, etc, but not on a topic page where I use the size 70 avatar.

There are no errors in /logs or on sidekiq.

Let me know if there is any more information I could provide or steps I could try to solve this issue. Thanks!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [16.Февраль.2016 01:13:13 UTC](https://meta.discourse.org/t/letter-avatar-generation-issue-non-standard-size-only/39646/2 "2016-02-16T01:13:13Z")

</div>

@mpalmer can you have a look?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [16.Февраль.2016 01:24:48 UTC](https://meta.discourse.org/t/letter-avatar-generation-issue-non-standard-size-only/39646/3 "2016-02-16T01:24:48Z")

</div>

> [@Yuun](#):
>
> switch 70.png to 60.png and it works

In my  
public/uploads/default/optimized/1X  
folder there are the “same” pngs that are  
20, 25, 32, 40, 45, 50, 60, 64, 75. 90, 96, 120, 135, 180, 240, 360

Seems to me to be more than enough already. Maybe “round” to the nearest available?

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [16.Февраль.2016 01:32:18 UTC](https://meta.discourse.org/t/letter-avatar-generation-issue-non-standard-size-only/39646/4 "2016-02-16T01:32:18Z")

</div>

@sam: On it.

@Yuun, the requests you’re seeing there are going to our CDN letter avatar service; it _should_ support arbitrary sizes, but clearly something isn’t working right. I’ll dig in and see what’s going on.

---

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [16.Февраль.2016 02:25:34 UTC](https://meta.discourse.org/t/letter-avatar-generation-issue-non-standard-size-only/39646/5 "2016-02-16T02:25:34Z")

</div>

Thanks for the quick check in!

I’m not sure if you changed something or if the process was just delayed, but the user’s avatar has generated now ([previous link](http://sih.onemadogre.com/letter_avatar_proxy/v2/letter/l/49beb7/70.png)).

I’ve tested out creating a couple new users and they seem to be generating avatars correctly again.

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [16.Февраль.2016 02:26:47 UTC](https://meta.discourse.org/t/letter-avatar-generation-issue-non-standard-size-only/39646/6 "2016-02-16T02:26:47Z")

</div>

Hi Yuun,

Yes. I did change something – the avatars service wasn’t generating new avatars (but existing ones were still being served from cache). I kicked things in just the right place, and now everything is OK again.

---

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [16.Февраль.2016 02:28:17 UTC](https://meta.discourse.org/t/letter-avatar-generation-issue-non-standard-size-only/39646/7 "2016-02-16T02:28:17Z")

</div>

Ah! Well then thank you for both the quick check in and quick fix. 😃

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [16.Февраль.2016 02:30:15 UTC](https://meta.discourse.org/t/letter-avatar-generation-issue-non-standard-size-only/39646/8 "2016-02-16T02:30:15Z")

</div>


