This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Avatar Preview


Shows an avatar preview on the comment form based on the email address entered.

Uses the Javascript MD5 library by Paul Johnston.


  1. Upload the plugin directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Place <div id="avatarPreviewBox"></div> in your comments template where you want the preview to appear. Make sure your email input field has id="email". You may optionally add class="previewsize-64" to change the size of the preview, where 64 is the size in pixels.


What do I need to know to style it to match my theme?

The following IDs are used:

  • avatarPreviewImage for the avatar itself
  • avatarPreviewDesc for the description/status (“Enter your email to see an avatar preview.” for example)
  • avatarChangeLink for the link to

Example generated HTML:

<div id="avatarPreviewBox">
    <img id="avatarPreviewImage" src=";d=identicon&amp;s=32" height="32" width="32" />
    <p id="avatarPreviewDesc">Gravatar for ''</p>
    <p><a id="avatarChangeLink" target="_blank" href="">Change at</a></p>

Example CSS:

avatarPreviewBox {

padding: 0;
margin: 0;
background: transparent;

avatarPreviewBox #avatarPreviewImage {

float: left;
padding-right: 3px;

avatarPreviewBox p {

margin: 0;
padding: 0;

Contributors & Developers

“Avatar Preview” is open source software. The following people have contributed to this plugin.




  • Fix broken check that caused the preview to fail to load.


  • Don’t serve the javascript to logged in users.


  • Fix Javascript errors if the email field or preview box aren’t found.
  • Embed avatarpreview.js in the footer instead of the header.
  • Update compatable version to 2.9.2
  • Document format of generated code better, for easier styling.


  • Correctly support rating settings other than “g” and default avatars other than “identicon”.
  • Support configuring the size of the preview image via a “previewsize-NUMBER” class.


  • Add additional documentation
  • Update compatable version to 2.9


  • First public release