BuddyDev

Search

[Resolved] BuddyPress Signup Avatar. not correct cropping preview

  • Participant
    Level: Enlightened
    Posts: 95
    Maksim Rusakovich on #17593

    Hello.
    Could you please, check cropping preview?

    http://prntscr.com/ky5djr

    I think, something is wrong with cropping
    http://prntscr.com/ky5f4v

    Thank you.

  • Keymaster
    (BuddyDev Team)
    Posts: 21762
    Brajesh Singh on #17596

    Hi Max,
    This plugin has not been updated recently. I will test, I am not sure if we will be able to support it(depends on current state of requirement by BP). I will update you in 1-2 hours.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 95
    Maksim Rusakovich on #17599

    Great. Thank you.

  • Keymaster
    (BuddyDev Team)
    Posts: 21762
    Brajesh Singh on #17616

    Hi Max,
    Please upgrade to 1.0.3

    https://buddydev.com/plugins/bp-signup-avatar/

    If you are using BP Legacy template pack, It will work(From your screenshot, It seems you are using that).

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 95
    Maksim Rusakovich on #17621

    Hello Brajesh

    I updated the plugin.
    But the issue is the same
    http://prntscr.com/kyd63f

    Could you check it?

     * Limit BuddyPress Avatar file size.
     *
     * @param int    $size size in bytes.
     * @param string $type upload type(avatar, cover_upload).
     *
     * @return int
     */
    function buddydev_limit_buddypress_avatar_file_size( $size, $type ) {
    
    	if ( 'avatar' == $type ) {
    		$size = 5000 * 1024; // in bytes, 1024 bytes = 1KB
    	}
    
    	return $size;
    }
    
    add_filter( 'bp_attachments_get_max_upload_file_size', 'buddydev_limit_buddypress_avatar_file_size', 10,2 );
    

    I use this snippet if it can influence.

  • Keymaster
    (BuddyDev Team)
    Posts: 21762
    Brajesh Singh on #17624

    Hi Max,

    The above code will have no effect. It restricts file size only.

    It seems to me the problem lies with css applied on the cropped preview. Try right clicking and checking the css. Is there height/width applied , you will need to override it to avoid distortion.

  • Participant
    Level: Enlightened
    Posts: 95
    Maksim Rusakovich on #17626

    Hello Brajesh.

    Thank you. Is it possible to fix aspect ratio?

    I checked standard avatar changer in member profile.
    It uses the aspect ration. How to implement it with your plugin?

  • Keymaster
    (BuddyDev Team)
    Posts: 21762
    Brajesh Singh on #17630

    Hi Max,
    We are using ‘bp_core_add_cropper_inline_js’ which should have done it. Is there any chance that you have custom defined image size for avatar?

    There are two possibilities:-

    1. The bp_core_add_cropper_inline_js() is not finding the image and that’s why not setting the ratio

    2. Or there is a custom defined image height/width and their ratio is something else(I doubt it).

    I will be investigating more tomorrow now.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 95
    Maksim Rusakovich on #17678

    Hello, Brajesh

    Could you, please, check the plugin?
    I used with standard wordpress theme 17.
    Cropping is working.
    But the avatar is not loading. I can’t see in Admin panel in Pending users.
    Also avatar mod plugin is disabled.

    ===
    By the way,
    https://wordpress.org/plugins/buddypress-upload-avatar-ajax/
    plugin crop ratio is correct.
    But other functions are not working.

  • Keymaster
    (BuddyDev Team)
    Posts: 21762
    Brajesh Singh on #17682

    Hi Max,

    The avatars become visible after a user account is activated. Try activating an account.

    I haven’t tried the upload avatar via ajax plugin. Seems like a good option.

You must be logged in to reply to this topic.

This topic is: resolved