Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Avatar Size in Vanilla 2

edited December 2010 in Vanilla 2.0 - 2.8
I am trying to figure out how to increase the size of the avatars in the discussions.
I've searched here extensively, but all the answers seem to be for <2.0 and I am missing some of the files that they reference.

Any help would be greatly appreciated.

Comments

  • edited December 2010
    In your config.php file add the following and change it to your preferred width;

    $Configuration['Garden']['Thumbnail']['Size'] = 50;

    But it only works on newly uploaded avatars and I presume it's the same default size for the thumbnail of uploaded files.
  • LincLinc Detroit Admin
    @Pixelspin nailed it. Also check out the Formatting plugin for easy setting of image size values.
  • Thank you so much!
  • edited December 2010
    Sorry, It doesn't work like I expected. When I change the size in the config file as instructed the resolution of the picture seems to change, but the size does not. (Each time I re-uploaded the picture to reset it) For instance, when I re-size it to something like 200 the picture stays the same size, but seems to be a re-sized version of a bigger image, as the antialiasing goes away. When I change it to something like 25 it gets blurry, as a scale-up of a small image. So the setting seems to be affecting the image up loader but not the actual posts. Is this a setting in the theme? (I'm using the default theme)

    Thanks again for your time.
  • You'll need to make a small change to the style.css file in your theme. Just look for: 'ul.MessageList div.Meta span.Author img' and change the width and height values to match the value in your config file.
  • Thank you, it works now.
  • KEPKEP New
    edited March 2013

    Here's another question. Say my uploaded picture is a non-square dimension like 250 width by 424 height. I made my avatars to be 130x130, but instead of displaying the uploaded picture fully (but shrunk) it displays a 130x130 region of the picture, and it's also shrunk a bit. Any way to change this? I've linked pictures in case I'm not being clear...

    Original - http://i.imgur.com/c3gOfvm.png

    Avatar - http://i.imgur.com/xfYEGB8.png

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    you may try this

    .Photo img {
    height: auto;
    width: 250px;
    }
    
    img.ProfilePhotoMedium {
    width: 50px!important;
    height: auto!important;
    
    }
    
    .Item .Author img {
    height: auto;
    width: 40px;
    }
    
  • KasperKasper Scholar of the Bits Copenhagen Vanilla Staff

    @KEP said:
    Here's another question. Say my uploaded picture is a non-square dimension like 250 width by 424 height. I made my avatars to be 130x130, but instead of displaying the uploaded picture fully (but shrunk) it displays a 130x130 region of the picture, and it's also shrunk a bit. Any way to change this? I've linked pictures in case I'm not being clear...

    Original - http://i.imgur.com/c3gOfvm.png

    Avatar - http://i.imgur.com/xfYEGB8.png

    This is how thumbnails work. You can adjust the thumbnail in the "Edit profile" menu to ensure that it displays exactly the part of the avatar that you'd like.

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @kasperisager I think they want the thumbnail to be rectangular instead of square , at least that is what I think, maybe the better way would be to alter the thumbnail size in the config.php....

  • 422422 Developer MVP

    No they want square avatars from rectangular images instead of cropped wierd square images.
    Kasper nailed it

    There was an error rendering this rich post.

  • I see. Thanks guys!

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    lol so the question should have been "How to crop and adjust thumbnail " . Avatar size is something else.

Sign In or Register to comment.