WordPress.org

Ready to get started?Download WordPress

Forums

User Avatar
Images are too small (4 posts)

  1. rwlinda
    Member
    Posted 1 year 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!

    http://wordpress.org/extend/plugins/user-avatar/

  2. rwlinda
    Member
    Posted 1 year ago #

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

  3. Jonas Lundman
    Member
    Posted 10 months 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
    Member
    Posted 6 months ago #

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

    Regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic