Forum Discussion
- lukBoss
jaikumar1 You might wanna have a look at this: https://lithosphere.lithium.com/t5/Developer-Discussion/Show-core-avatars-larger-on-messages/m-p/205629#M9320
Controlling the size of the avatars is not something the API does (or should!), it is done via some pretty undocumented URL path trickery, e.g. look at a random avatar I picked from the Lithosphere:
notice the end of the URL, the variations I do know about are:
.../avatar-display-size/message -> small .../avatar-display-size/profile -> medium .../avatar-display-size/unspecified -> larger
there might be more or there might be documentation about it that I do not know about =), but that's all I know about avatar sizes =D...
- jaikumar1Mentor
Hi luk
Thank you for your response. I have checked the option, and not sure the following code can update based on your suggestion.
<#assign avatar_info = restadmin("/users/id/"+login_user_id+ "/profiles/avatar").image /> <img class="lia-user-rank-icon-left" title="${login_user_info.user.login}" alt="${login_user_info.user.login}" src="${avatar_info.url}" height="63" width="63" />
- lukBoss
jaikumar1 what is the output of
${avatar_info.url}
would be easier to tell based on that, but I also see you're setting
height="63" width="63"
attributes, which of course have nothing to do with the original avatar size but force these dimensions onto the image. If the avatars are square you shouldn't have much problems, but if they are not, you gonna have squished images (e.g. not resized proportially). Based off these dimensions I would go for the /profile size (see link above), but I do not know the exact dimensions this sizes the avatars, my guess would be the long side is resized to 128px, so that should be enough, the /message size looks like long side = 50px, so that would be a bit too small...
Related Content
- 11 years ago