Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there any way to change the aspect ratio of the WordPress Avatars? Or is this hardcoded?

Greetings, .wired

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Possible sollutions:

  • Use Css with something like overflow: hidden; and "cut out" what you need.
  • Use the filter apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt); and override the output of $avatar completely.
  • The function get_avatar() is pluggable. That means if you hook a plugin function early enough that already defines get_avatar() then this function will be used instead of the core function. See Core (link).
share|improve this answer

The aspect ratio is dictated by the Gravatar service and it's not customizable.

share|improve this answer
true but I think you can adjust the size via url if I'm not mistaken. Gravatar sends the suse in a url. I'm not 100% percent on this though –  xLRDxREVENGEx May 18 '11 at 5:27
I am talking about avatar size, not Gravatar size. I can disable gravatar and use also other sources and plugins to change the image source, but they all got the aspect ratio 1:1 –  maximski May 18 '11 at 8:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.