I believe I have identified a bug and I would like to bring it to your attention. Here are the steps to reproduce the issue:
( 1 ) Use the get_avatar method (https://developer.www.ads-software.com/reference/functions/get_avatar/) with the following code:
printf('%1$s', get_avatar($authorId, 420, '', '', array('class' => 'img-fluid')), esc_url(get_author_posts_url($authorId)));
This should return the desired output with the correct resolution.
(2) However, when the plugin is activated and an attempt is made to view the author page, the get_avatar method returns smaller images from the location ../wp-content/uploads/nsl_avatars. Once the plugin is deactivated, everything returns to normal.”
Please consider fixing this issue. Thank you.
]]>get_avatar( get_the_author_meta( ‘user_email’ ), 50); will show the avatar-image in his original dimensions.
]]>I am working on a customized Buddypress Blogs loop, and I want the blog avatar to return a different image if no Gravatar is found with the site admin email, than the default image returned normally.
In other words, I am trying to set up an alternative “Default” Gravatar that only applies to one specific section of my website.
To do this, I am trying to use either the get_avatar() or get_avatar_url() functions, and setting the custom url in the $default parameter as stated in the codex.
$avatar =
'<img src="'.get_avatar_url($blogs_template->blog->admin_user_id, array(
"size" => "250",
"default" => $url,
)).'" alt="Profile photo of site author">';
This is not working. Setting the default parameter to standard things like “blank”, “mystery” or “404” also do not work. I have been spending a lot of time troubleshooting this, and am starting to wonder if it’s a bug with the function itself.
Anyone have any ideas?
Thank you so much!
]]>For instance, this doesn’t work, the class “rounded-circle” doesn’t get added to the img:
get_avatar( $comment, $args['avatar_size'], '', '', array( 'class'=>"rounded-circle" ) )
Thanks for reading me,
Hope this’ll get fixed
[avatar]
, get_avatar
and get_wp_user_avatar
produce the same poor resolution like on desktop computers. It must have anything to do with the attribute srcset
. It seems that WP User Avatar can’t handle this.
Can anybody help me? Thanks in advance!
Martin
]]>The get_avatar() function seems to be working correctly, however this seems to be causing the issue: $str = preg_replace(‘/’.$pattern.’/’, $value , $str );
My test profile username is “ICEMAN” and the custom menu name displays the following string text immediately to the left of the profile picture and username:
ICEMAN” HREF=”HTTPS://WWW.YATALT.COM/INDEX.PHP/USER/”>
So visual this being the menu display name (*picture* = actual picture image
*username* = display_name):
ICEMAN” HREF=”HTTPS://WWW.YATALT.COM/INDEX.PHP/USER/”> *picture* *username*
So the main issue is that the username is being shown twice and the href is also showing. I only want to see the picture and the username. Can anyone please let me know how to fix this. I have feeling it might be a regex issue.
]]><?php
$user_id = wp_get_current_user(); echo get_avatar( $user_id ); ?>
but it always seems pull the gravitar image instead even though it shows the new uploaded image in “Your Profile”. What am I doing wrong here?
]]>I’m customizing my wp_list_comments () and I’m doing the markup of HTML and PHP manually, but when I try to call the get_avatar (‘comment_image’, 170) it does not load the photo sent by the form, but the picture default anonymous wordpress.
<?php
echo get_avatar('comment_image', 170);
?>
]]>Going in and updating the user’s profile isn’t enough. The only thing that seemed to work was:
1) go into each profile remove the “Custom User Profile Photo”
2) Update the profile.
3) After update re-add their custom profile picture.
4) Update the profile.
After doing this it updates the gravatar/avatar photo. Unfortunately when you have 100+ users this is a huge hassle. Haven’t looked into the code yet, but this seems like something that should be a fairly easy fix.
]]>