Opened 13 years ago
Closed 12 years ago
#19539 closed defect (bug) (fixed)
get_avatar() returning wrong image size which inserts large image in admin bar
Reported by: | andrewryno | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | Toolbar | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Just updated a site to 3.3 and noticed that when you open the "Howdy, {user}" admin bar menu, the image sometimes is larger than the 64px image requested by get_avatar() (/wp-includes/admin-bar.php line 174). It instead is showing a 156x156 image.
I don't know if this is a bug in get_avatar() or what. But get_avatar() DOES output the correct HTML with width and height set to 6 and the ?s=64 query string added to the URL. However, the reset for the admin bar (#wpadminbar *) sets width/height to auto, so those HTML attributes are ignored.
Wrote a patch to resize it using CSS, but I don't know if it's a bug in get_avatar() that might need to be addressed.
Attachments (2)
Change History (11)
#2
@
13 years ago
- Cc boonebgorges@… added
See also https://buddypress.trac.wordpress.org/ticket/3782#comment:13. In the case of BuddyPress, we give users an easy way to serve up a local fallback (the ?d= parameter for the Gravatar call), and it's only in cases where the logged-in user falls back on this locally served avatar that the problem arises. I can confirm that 19539.diff will fix the problem.
#3
@
13 years ago
- Component changed from General to Toolbar
- Milestone changed from Awaiting Review to 3.4
#5
@
13 years ago
+1
Just saw this bug in action (and submitted that dupe ticket with patch) while working on a plugin of mine (Add New Default Avatar).
+1