How to increase Discourse avatar resolution with JS?

Absolutely, always prefer the api method, it will continue working for much longer cause we can add backwards compat as needed.