Support Forum

Avatar resize

SP SPQC
SPQC
Member

I modified avatar size to be 75px square from default 50px.  I imported a 75px square avatar and in every post it displays like it should at 75px but the one at the top where it says Logged in as is displayed at 74px thus making it look a bit fuzzy.

 

I see your avatar here don’t have this problem, maybe because they were left at 50px, maybe give a try with a 75px x 75px and see if it happens for you also (and why!).

 

I tried with another theme just in case but result was the same.

32 Answers

New Answer

MP Mr Papa
Mr Papa
Member

lol. now I know what you meant.  this is a duplicate topic of your other avatar size topic… lets keep it over there…

SP SPQC
SPQC
Member

Like I wrote in the other post, I modified avatar size to be 75px square from default 50px.  So users will be able to upload 75px x 75px image as avatar.

 

I imported a 75px square avatar for myself and I thought all was fine up to today where I realized that the avatar that is shown at the top next to Logged in as is displayed at 74px (resized) thus making it look a bit fuzzy.

 

On your own forum here where you still use the default avatar that are 50px square, this does not happen.

 

On you test machine, can you try to change avatar size to 75px then upload one and see if the same happen?  I right-click with firefox and see image properties, that’s where it says it a 75px image resized to 74px.

 

In posts where the avatar is shown on the left, this is not happening.

BR Brandon
Brandon
Member

I have a 90×90 image, SP is set to max of 80. It resizes to 80 on top and posts. It also looks fine resized, not blurry.

Maybe check with Firebug and see what the resize is showing there? See if it says something like <img width=”75″ class=”spAvatar”

SP SPQC
SPQC
Member

Exactly what is there width=”75″ class=”spAvatar”

 

When I get the Profile tabs fixed I will try a different size.

MP Mr Papa
Mr Papa
Member

works fine for me…exactly 75 everywhere…

no chance its gravatar or cached?

SP SPQC
SPQC
Member

I tried with 90px and same thing, the top one show as 89px. This is a mystery to me.

MP Mr Papa
Mr Papa
Member

I dont know… works for me for all different sizes… did you miss my questions?

any other plugins that might ‘mess’ with images?

SP SPQC
SPQC
Member

Don’t use Gravatar and I disabled a few WP plugins without success.

 

Could spLeft is causing this?  If I remove it, it’s no more resized.
Or if I add width: 91px to spImg, it’s also ok but if it’s 90 it’s not, even if the avatar image is really 90px.

SP SPQC
SPQC
Member

Ok this morning I tried with a different WP theme (I tried with TwentyEleven) and the forum was shrinked in the center and instead of 89px this time it was 88px.  I thought it could depend on total width f wrapper so I went back with my original theme and expended to 1200 the width but it’s still at 89px.

 

I’m lost and have no more ideas…  adding a div around with proper width and height did not help.

MP Mr Papa
Mr Papa
Member

is it the actual image that is smaller? or is there a width size affecting it?  if the former, simple press does not do any actual resizing…

SP SPQC
SPQC
Member

Actual image is 90px but the top one next to Logged in as is displayed as 89px in both Firefox and IE9.

 

Before going to bed yesterday I found out that if I remove spLeft then it is no more resized OR if I add width=91 to SpImg then it is also properly displayed.

 

Could it me something inline with it and next to it that’s compressing it?

MP Mr Papa
Mr Papa
Member

nothing can actually compress the image when displaying (maybe some js – but we dont have that)…  if it does not have a width (or height) statement, it is shown in the size of the actual image on the server…  

SP SPQC
SPQC
Member

Where is the spAvatar class defined?  When I look at it in Firebug it’s like empty, I mean in the panel on the right I should see the Style and in which file it is defined but it’s not showing.  I took a look in a few styling files and nowhere to be found.

 

And where is the sp_UserAvatar function?  This is where the output is constructed so I may take a look.

MP Mr Papa
Mr Papa
Member

its not defined…  just because an element has a class or ID applied to it does not mean we have actually applied a styling too it…  we put the classes and IDs there so users can specifically style if desired…