WordPress.org

Ready to get started?Download WordPress

Forums

WP Biographia
[resolved] Lower resolution image when using Buddypress (6 posts)

  1. luizhpj
    Member
    Posted 1 year ago #

    Hi,

    I'm running a Buddypress installation with WP-Biographia.

    Buddypress manages the user images, and WP-Biographia is fetching the user images correctly. Nevertheless, when shown in WP-Biographia, the image quality is much lower.

    You can see and example here:

    Buddypress Profile: http://ogpremium.com.br/members/cafreitas/profile/change-avatar/

    Post with WP-Biographia
    http://stakeholdernews.com.br/artigo/desenvolvimento-profissional-projetos/

    Is there a way to solve this?

    Thanks for the help and for this great plugin!
    Luiz

    http://wordpress.org/extend/plugins/wp-biographia/

  2. vicchi
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    It looks like BuddyPress is plugging the WordPress get_avatar function and is serving up avatar images sized at 35px square. You're using WP Biographia's default avatar size setting of 100px square so the avatar images are being scaled up and loose their resolution.

    I'm not a BuddyPress user but I would hope that this is either a configurable setting within BuddyPress or within the BuddyPress template that you're using.

    So you can either try to make BuddyPress serve up avatars at a larger size and thus a higher resolution or you can tell WP Biographia to serve up avatars at a smaller size to match those that it's getting from BuddyPress.

    -Gary

  3. vicchi
    Member
    Plugin Author

    Posted 1 year ago #

    Haven't heard back from you in over 2 weeks so I'm going to assume you've either fixed this or it isn't an issue any more. Feel free to get back in touch if it still is.

    -Gary

  4. Maruti Mohanty
    Member
    Posted 1 year ago #

    Hi I have faced a similar problem but not using this plugin but while using buddypress, For all the images which are uploaded and not fetch from gravatar.com ... loads a low resolution image.

    After a research I found that low resolution image has the image source ending as -bpthumb where as the high resolution one ends with -bpfull and it is all going on in bp-core-avatars.php, few filters are available to change this but didnt work through out the site so I made my own hack. I did it using js and it worked for me .

    jQuery('.avatar').each(function(){
            // Replacing the -bpthumb with -bpfull for higher resolution images.
            var source = jQuery(this).attr('src');
            var startIndex = source.lastIndexOf('-');
            var endIndex = source.lastIndexOf('.');
            var removeValue = source.substring(startIndex, endIndex);
            if('-bpthumb' == removeValue){
                var newSource = source.replace(removeValue, '-bpfull');
                jQuery(this).attr('src', newSource);
            }
        });

    You can change the selector if it doesnt work for you, but it should
    Hope it helps :)

  5. vicchi
    Member
    Plugin Author

    Posted 1 year ago #

    Nice work-around; thanks for this. I never did hear back from the original poster as to whether the problem was solved from within BuddyPress or from within the theme.

    -Gary

  6. Maruti Mohanty
    Member
    Posted 1 year ago #

    :) ..

    Hope it helps other users :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic