WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: User Photo] user photo size with get_avatar (3 posts)

  1. donzacharias
    Member
    Posted 4 years ago #

    I'm using threaded comments with a callback function on wp_list_comments to control the comment display loop. I have these lines in my callback function

    <?php if($depth==2) $avatar_size=32; else $avatar_size=48 ?>
    <?php echo get_avatar($comment,$size=$avatar_size); ?>

    And in the User Photo options I have the thumbnail dimension set to 48px, and both Serve Avatar as Fallback and Override Avatar checked. When users have uploaded avatars it is serving them up at a different sizes than 48px, is that just because they don't get resized on the filesystem? Do I need to manually resize them?

  2. donzacharias
    Member
    Posted 4 years ago #

    Answering my own question:

    1. Resize the photos by hand to fit your new dimensions
    2. delete from wp_usermeta where meta_key like 'userphoto_thumb_width'
    3. delete from wp_usermeta where meta_key like 'userphoto_thumb_height'

    It removes all thumbnail dimensions from the DB, so they will just display without those in the IMG tag but they will be the correct size.

  3. donzacharias
    Member
    Posted 4 years ago #

    ...following up my own answer, it does NOT automatically read the new dimensions, you have to update them.

Topic Closed

This topic has been closed to new replies.

About this Topic