WordPress.org

Ready to get started?Download WordPress

Forums

User Photo
Dimensions (7 posts)

  1. jacobdubail
    Member
    Posted 2 years ago #

    How can I control the default sizes for these images?

    Thanks,
    J

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

  2. kazary
    Member
    Posted 2 years ago #

    Same question. I wonder how to control the width and height when I put the <? php userphoto_the_author_photo() ()?>

  3. kazary
    Member
    Posted 2 years ago #

    Someone?

  4. jay76
    Member
    Posted 2 years ago #

    userphoto_the_author_photo('', '', array(width => '220', height => '100%'));

    This will give you an image 220px wide, and whatever height is required to keep the image ratio.

    Of course, you can set both values to whatever you want.

  5. jay76
    Member
    Posted 2 years ago #

    Actually, I had to change my code to the following:

    userphoto_the_author_photo('', '', array(width => '220', height => 'auto'));

    The 'auto' value is invalid, but it seems to do what I want.

  6. C1pr1an
    Member
    Posted 2 years ago #

    Replace from "user-photo.php" line 112:
    $img = userphoto__get_userphoto($userid, (abs($full_dimension - $size) < abs($small_dimension - $size)) ? USERPHOTO_FULL_SIZE : USERPHOTO_THUMBNAIL_SIZE, '', '', array(), '');
    with:
    $img = userphoto__get_userphoto($userid, (abs($full_dimension - $size) < abs($small_dimension - $size)) ? USERPHOTO_FULL_SIZE : USERPHOTO_THUMBNAIL_SIZE, '', '', array(width => $size, height => '100%'), '');

    that will rezolve all problem with size.
    For autor: pls. consider that on next update!

  7. markali
    Member
    Posted 1 year ago #

    Hoping to bump this up. I replaced the code suggested by C1pr1an and it works find in Firefox but in Chrome and IE and, I believe, Safari, the image is stretched. The image, itself, is sized correctly

    Any ideas???

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags