User Avatar
Images are too small (4 posts)

  1. rwlinda
    Posted 3 years ago #

    I use the images on a page where user can show a profile picture and some info about themselves. The images uploaded are only 50x50px large, while I designed the page for 160x160px images. How can I make sure the avatars are 160x160px?? Thanks!


  2. rwlinda
    Posted 3 years ago #

    Sorry, the images are 60x60px (not 50x50px as I stated in my original post)

  3. Jonas Lundman
    Posted 2 years ago #

    In your functions php:

    if ( !defined( 'USER_AVATAR_FULL_WIDTH' ) ) define( 'USER_AVATAR_FULL_WIDTH', 160 );
    if ( !defined( 'USER_AVATAR_FULL_HEIGHT' ) ) define( 'USER_AVATAR_FULL_HEIGHT', 160 );

    Then the right sizes are created, but in the plugin corefiles, the constants are not in use for the mark-up, so the images got a width="150" height= attribute and so on.

    You can override this by !important css rules like:

    div#someID img { width: 160px !important; height... }

    The templatefiles also calls the sizes like:
    echo user_avatar_get_avatar($profile->ID, 150);

    they SHOULD be called like this:
    echo user_avatar_get_avatar($profile->ID, USER_AVATAR_FULL_WIDTH);

    It seems like the author started with this in mind but need money for the rent and have to go to work... (joking)

  4. fouldsy99
    Posted 2 years ago #

    I couldn't find that piece of code in themes/functions.php?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • User Avatar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic