Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Avatar Size in Vanilla 2

edited December 2010 in Questions
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.
  • LincolnLincoln Community Instigator Vanilla Staff
    @Pixelspin nailed it. Also check out the Formatting plugin for easy setting of image size values.

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • 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 Jester 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;
    }
    
    SomethingEllie
  • KasperKasper Front-end Wizard 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) | Web Designer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

    KEP
  • vrijvlindervrijvlinder Jester 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

    422 Real Estate Australia , now open Check it out

    KEP
  • I see. Thanks guys!

  • vrijvlindervrijvlinder Jester 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.