Opened 15 years ago
Closed 15 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 |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | Toolbar | Version: | 3.3 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
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
@
15 years ago
- Cc 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.
#5
@
15 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).
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
+1