refactor avatar url to reduce size of definitions

I think we should move all common parts of avatar uri to variable and use loop to append that.
Here is what i suggest, what do you think?