# How to increase Discourse avatar resolution with JS?

**URL:** <https://meta.discourse.org/t/how-to-increase-discourse-avatar-resolution-with-js/41807>\
**Category:** Product Support\
**Created:** [31 במרץ,‏ 2016,‏ 4:22am UTC](https://meta.discourse.org/t/how-to-increase-discourse-avatar-resolution-with-js/41807 "2016-03-31T04:22:46Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Drew\_Warwick](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/drew_warwick/32/80591_2.png) [@Drew\_Warwick](https://meta.discourse.org/u/Drew_Warwick)\
**Post date:** [31 במרץ,‏ 2016,‏ 4:22am UTC](https://meta.discourse.org/t/how-to-increase-discourse-avatar-resolution-with-js/41807/1 "2016-03-31T04:22:46Z")

</div>

I prefer to increase the avatar sizes on Discourse so I can see them better. You’ll run into an issue doing this though because since the avatar images are 45x45 pixels, if you stretch them they get blurry. I had been using a snippet of of javascript (not made by me, and I forgot where I found it) to upscale the resolution of avatars since around last September, but a month or two ago it stopped working. Here is what I was using:

```plaintext
var originalAvatarImg = Discourse.Utilities.avatarImg;

Discourse.Utilities.avatarImg = function(options) {
    if (options.size === 'large' || options.size === 45) {
        options.size = 120; 
    } 
    return originalAvatarImg(options); 
}

Discourse.Utilities.avatarImg({size: "large"});
```

What was changed in Discourse in the past month or two that would break this, and how can I change that code to fix it?

---

_[View the full topic](https://meta.discourse.org/t/how-to-increase-discourse-avatar-resolution-with-js/41807)._
