Advertisement:

Author Topic: Help Avatar Size  (Read 826 times)

Offline dankayn

  • Newbie
  • *
  • Posts: 2
Help Avatar Size
« on: February 12, 2019, 10:56:20 AM »
Hi there, first of all im using the latest SMF version 2.015. The problem  is that when someone uploads an avatar smf don´t resize it, it just keep showing the img original size and it´s really weird. PD Im using a template, maybe this is the problem but i want to know if thers a way of how to fix this.

Images of what im talking about


Offline dankayn

  • Newbie
  • *
  • Posts: 2
Re: Help Avatar Size
« Reply #1 on: February 12, 2019, 11:05:35 AM »
Theme im using: hxxp:smftricks.com/index.php?topic=429.0 [nonactive]


What i want: a way to autoresize uploaded avatars
example: i upload a pic then when i click save profile the forum automatically resize it to 150 idk how to explain it

Offline drewactual

  • Full Member
  • ***
  • Posts: 654
    • College Football Fan Site CFB51
Re: Help Avatar Size
« Reply #2 on: February 12, 2019, 11:27:23 AM »
track this, it'll help you in many aspect:

1- go to the page in question and see the avatar... right click the page and 'view source'... search for 'avatar' and observe what div class it is in.

for instance, it is possibly in a div class called 'poster' and in an li class called 'avatar.

2- after securing this information, open your css file for your theme. 

3- search it for the .div class's you found in the first step.  after discovery, append this css rule :

Code: [Select]
. (name of class with avatar in it) img{width: 65px /*size of width in pixels you want the image/avatar to be*/; height: auto;}

4- save file.
5. return to page with avatar, hold shift punch refresh (or f5) and see if it is the size you want... if so, good, if not, start at #3 above and adjust accordingly.

you can also approach it the other way, which is to set the height to a definitive size and make the width auto calculate.

there is a place in your admin settings to do this, but it's been my experience it doesn't work all the time- this method works ALL the time. 

an example:
Code: [Select]
.poster .avatar img{width:65px; height:auto}