# Avatar editor not working



## pointvirgule

Hi. It looks like there is a new bug in the system that makes it impossible to change one's avatar. Upon uploading a new image, the message "Upload completed sucessfully" appears, but the avatar remains unchanged. Also, when you delete your old avatar, then try to upload a new one, it's the old avatar, the one you just deleted, that reappears. Thanks.


----------



## DonnyB

There have been similar problems reported recently in this thread:
Avatars using Xenforo

You might find it helpful to take a look there, especially posts #34 onwards.


----------



## pointvirgule

Oops! I missed that. Thanks.


----------



## KaRiNe_Fr

Salut PV,


pointvirgule said:


> Oops! I missed that. Thanks.


I guess this specific issue should be discussed in a specific thread.
I, too, experienced this issue when helping a friend of mine (and surely of yours! ) to change the avatar I made for her to a more up-to-date one (regarding the season!).
I don't know the architecture behind WR but it's like changing your avatar is only changing it on one server and you have to wait for a sort of replication/synchronization of this update on the other(s) server(s) to occur before everyone can see your changes. Or maybe there is a proxy cache in between keeping sending the old avatar...
Meanwhile, you get those weird situations:












So you keep on changing your avatar in the hope to see the change and... you're going nuts! 

Any clue?

P.S.: I also missed the old possibility to change your avatar from a URL, as all my avatars are there to be easily accessible from all my devices.


----------



## pointvirgule

Salut Karine.  Our common friend kept uploading her new avatar and getting the message "Upload completed sucessfully," but the new image wasn't showing. She wondered, "Where in hell was the file uploaded to?" In the end, the new avatar only showed up in thread pages a good 24 hours afterwards.

At the heart of the problem is the content delivery service Amazon CloudFront, where the avatars are hosted. There seems to be some sort of synchronization (or caching?) issue between their servers and the WR system.

I must say the other thread I was referred to wasn't much help, but I chose not to insist, as this is a minor issue, and I figured Mike had other things on his plate. But it would be nice if eventually the avatar management function was made more responsive.

Another thing that bugs me is that avatars must be at least 96 x 96 pixels in size, otherwise they get stretched. I had to add a large background to my tiny avatar in order for it to display correctly; I'm not very fond of the result.


----------



## Nicomon

This common friend is now very happy with her bunny at the beach.

But yes... I really did nearly go nuts trying to upload it.  
Several little Ray-Ban bunnies have been sitting on a cloud for several hours.


----------



## KaRiNe_Fr

Salut PV and Nico,

PV, it's not such a minor issue as many of us have to change their avatar to be shown properly with the new forums... Unless it was only a temporary Amazon service issue (I didn't bother to test it each day! ).

Nico, maybe they were turned into bunny angels?


----------



## Wordsmyth

pointvirgule said:


> Another thing that bugs me is that avatars must be at least 96 x 96 pixels in size, otherwise they get stretched. I had to add a large background to my tiny avatar in order for it to display correctly; I'm not very fond of the result.





KaRiNe_Fr said:


> PV, it's not such a minor issue as many of us have to change their avatar to be shown properly with the new forums..



Hi pv, KaRiNe,

I'm puzzled. Just after the switch to XenForo, I noticed that my avatar (unchanged from vBulletin days) was stretched and fuzzy. I was thinking of getting around to changing it, but then suddenly it started appearing, at least in threads, at its original size (I can't remember what that is, maybe 48x48, but it's clearly much less than 96x96) — and it's still there like that, looking fine, unstretched and taking up less space.

Maybe that was something Mike did to handle legacy avatars , and it doesn't apply to newly uploaded ones ...? But if the software's handling mine without any problem (no stretch, and no mask to pad it out to the bigger frame size), I'd have thought it ought to be able to do that with others of a smaller size.

@Nicomon:  PS to Nico: Beach Bunny looks really cool. Tell her not to forget the sun cream!

Ws


----------



## pointvirgule

<technicalstuff class="nerdy">

I'm looking at the HTML source of this page, and I notice something odd.

See the style attribute for Wordsmyth's avatar link (the part in red):
<a href="members/wordsmyth.10026/" class="http://d3g5y0t4vtts99.cloudfront.net/data/avatars/l/10/10026.jpg?1431197371" style="max-width:96px;max-height:96px;" alt="Wordsmyth" /></a>

And here is mine:
<a href="members/pointvirgule.341392/" class="http://d3g5y0t4vtts99.cloudfront.net/data/avatars/m/341/341392.jpg?1435807759" width="96" height="96" alt="pointvirgule" /></a>

The styling for Ws's avatar is correct, in my view: using "max-width" and "max-height", the image is set to be left alone if it is smaller than 96x96, which is the case. However, my avatar is forced to be resized to 96x96 px, because of the attributes "width" and "height."

The difference is that I changed my avatar after the migration to XenForo, while Ws did not.

I don't understand why new avatars are sized differently than the "grandfathered" ones. I would call that a bug, or at least an "undesirable feature." If all avatars used "max-width:96px;max-height:96px;", new avatars smaller than 96x96 would not get stretched and fuzzy.

</technicalstuff>


----------



## Wordsmyth

@pointvirgule : Good work, Sherlock! Well spotted. (My avatar is actually 53x53). I agree that it would be much better to allow new avatars _up to a max_ of 96x96, rather than stretched to that size with loss of clarity. 

Maybe when Mike has time he could take a look.

Ws


----------



## pointvirgule

Sorry, the code excerpts I posted earlier were wrong, due to an odd copy/paste fluke. The code for the avatars actually goes like this:
<a href="members/pointvirgule.341392/" class="avatar Av341392m" data-avatarhtml="true"><img src="http://d3g5y0t4vtts99.cloudfront.net/data/avatars/m/341/341392.jpg?1435807759" width="96" height="96" alt="pointvirgule" /></a>
That makes more sense. 

Like I said, I think changing width="96" height="96" to style="max-width:96px;max-height:96px;" in the <img> tag should do the trick.


----------



## Drake15

Yes, or (if the admin can modify the stylesheet) he can simply add two lines to the *.avatar* class stating the max width and height and that _should_ do the trick. If it doesn't, perhaps an *!important* declaration helps.


----------



## Peterdg

I did some test with your avatar. Changing the style does not help.

When I look at the source of your avatar,
[code]http://d3g5y0t4vtts99.cloudfront.net/data/avatars/m/594/594248.jpg?1434932056%22[/code] and I open it without any style or whatever applied to it, it is an image of 96px 96px, so I'm afraid it is the uploader process that formats the picture to 96X96 before storing it.


----------



## pointvirgule

Peterdg said:


> [...] I'm afraid it is the uploader process that formats the picture to 96X96 before storing it.


Shoot, I'm afraid Peterdg is right. I just tested it after uploading a new 32x32 avatar (and waiting a few hours for it to show up). Indeed it looks like it's "hard-resized" to 96x96 by the uploader, rather than "soft-resized" by the HTML/CSS. Oh well. Never mind.


----------



## Drake15

Hmm, I found this. It seems that the admin would have to edit a PHP file and the stylesheet in order to change the size of the avatars, and I don't know if that would stop the resizing. Maybe there's an option in the admin panel to enable/disable avatar resizing? I never used Xenforo before, I'm just familiar with PHPBB and IPB.


----------



## KaRiNe_Fr

Salut,

The XenForo community forum gives solutions to both this avatar processing issue (updating the php where the avatar size is hard coded to 96x96 px) and showing issue (updating css).
So it's up to Mike to decide if he wants to do something.


----------



## Wordsmyth

Extending Peter's research a bit, I've noticed that each member has three (or more?) avatar images on Cloudfront. The only difference between them in the URL is one letter: _l_ (that's_ L_), _m_, or _s_ (perhaps nominally large, medium, small?)

_L _appears to be the original uploaded image size; _m_ is 96 x 96; _s _is 48 x 48. Each is used in different places in the forum.

From what I can see, avatars that have been uploaded since the switch to XenForo have their_ m_ version displayed in threads (96 x 96), presumably because their _L_ version is generally bigger than 96 x 96. Whereas those of us who haven't changed our avatars (Peter, Loob, Kelly, me, ... etc) have our _L_ version displayed in threads, our _L_ version (original upload) being smaller than 96 x 96. [See also this thread.]

The exception, from what pointvirgule has said, seems to be a _new_ upload of an image smaller than 96 x 96. In that case, the _L_ version seems to be stretched to 96 x 96.

To my non-expert mind, it seems the solution would be to have the _L_ version kept at its original size in all cases (as it already is for the 'old' avatars, and for new avatars bigger than 96 x 96), then to use the _L_ (not_ m_) version for thread display, with max-width and max-height attributes.

But I'm no expert, and maybe it's not that easy ... I'm just glad my avatar isn't fuzzy any more (Thanks for that, Mike).

Ws
_[Edit: Minor mods in 3rd para.]_​


----------

