Letter avatar generation issue (non-standard size only)


(Sam) #1

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>:

<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

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!


(Sam Saffron) #2

@mpalmer can you have a look?


(Mittineague) #3

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?


(Matt Palmer) #4

@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.


(Sam) #5

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).

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


(Matt Palmer) #6

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.


(Sam) #7

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


(Sam Saffron) #8