Support » Plugin: WP Biographia » Change Author Image Size from 100X100 to 100X85

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter valeryvie

    (@valeryvie)

    Plugin Author vicchi

    (@vicchi)

    Hi,

    I’m afraid this isn’t a simple or trivial issue to solve. WP Biographia relies on the underlying WordPress avatar implementation, which in turn, uses (in order of priority) a plugged (overridden) version of the get_avatar WordPress API call, a Gravatar keyed on the user’s email address, or one of the stock WordPress avatar icons.

    Regardless of which icon is used and where it originates from, the WordPress get_avatar API only supports a single size parameter (see http://codex.wordpress.org/Function_Reference/get_avatar); in other words, WordPress assumes that the height and width of an avatar image will be the same. To put it another, simpler, way; WordPress only supports square icons.

    If you’re comfortable with writing PHP code and with the way in which WordPress hooks work, you could possibly write a custom get_avatar filter function (http://adambrown.info/p/wp_hooks/hook/get_avatar) which would parse the HTML img tag that emits the user’s avatar and override the height and width attributes. You’d need to either ensure that all your user’s avatars are the same size or be clever and detect when a non square avatar is being used and that that avatar is for one of your users and also ensure that the filter code is only being invoked within the context of WP Biographia to avoid overriding avatars for comments. You may also need to write some custom CSS to override the plugin’s (entirely valid) assumption that avatars are square, depending on your current theme and/or other installed plugins.

    Note that I say you could possibly write a custom filter. I haven’t tried to do this and I expect this won’t be trivial to do I’m afraid.

    -Gary

    Plugin Author vicchi

    (@vicchi)

    Haven’t heard back in over 2 weeks on this so I’m assuming you’ve sorted the problem and I’m marking this thread as resolved; feel free to reopen it if that’s not the case.

    -Gary

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change Author Image Size from 100X100 to 100X85’ is closed to new replies.