Post Avatar

A WordPress plugin simplifies the process of including a picture when writing posts. Authors simply choose from a predefined list of images in the Write Post page to display an image in a post. A template tag displays the image with The Loop. This plugin is similar to Livejournal userpics.

Authors: Vicky Arulsingam and Dominik Menke
Current Version: 1.5 (updated: May 11, 2012)
Get Support Here

Version History (Changelog)
Known Issues

Post Avatar was a finalist at The 2007 Philippine Blog Awards for Best Plugin/Extension.


  1. Easy selection of images in the Write Post screen.
  2. Scans images in sub-directories of the image option folder.
  3. Allows the following file types: .jpg, .jpeg, .gif and .png.
  4. Show avatar automatically in blog or use a template tag to display in themes.
  5. Does not display missing images.

Back to Top


  1. Upload the “post-avatar” directory to the WordPress plugin folder (/wp-content/plugins).
  2. Activate the plugin from the Plugin Management screen.
  3. Go to Settings ยป Post Avatar. Set the following options:

    * Path to Images Folder – location of your images folder in relation to your WordPress installation.

    * Scan the images directory and its sub-directories – Place a tick mark if you want to list all images including those in sub-directories of the image folder.

    * Show avatar in post – Show avatar automatically on your blog post. Uncheck to use the template tag (see Customizing Avatar Display, below).

Back to Top



Upload the images that you intend to use to the folder defined in the Post Avatar options.


1. To add an image to a post, go to the Post Avatar section (just below the Save button).
2. Select the image name from the list.
3. Save your entry.


If you set the option “Show avatar in post”, images will automatically appear in your blog post. Customize the stylesheet inside “wp-content/plugins/post-avatar/head/” if necessary.

You can also set your own css class and html style inside the options page. These settings apply to the automatic avatar display and the default template tag in all templates where the_content() and the_excerpt() tags are used. To define a different HTML/CSS style in each template use the template tag options specified below.

USING THE TEMPLATE TAG “gkl_postavatar”
To customize the display of the avatar further, be sure to uncheck the option, “Show avatar in post”. You can use the template tag: gkl_postavatar.

Add the following within The Loop:

Default Code
<?php if (function_exists('gkl_postavatar')) gkl_postavatar(); ?>

By default, the plugin will show your image with the CSS class, “postavatar”. Customize gkl-postavatar.css inside the head folder.
For example:
<div class=”postavatar”><img src=”” alt=”title of post” style=”width:100px; height:100px; border:none;” /></div>

Define Own CSS Classes
You can also define your own CSS-classes by using a query string. By adding this to The Loop:
<?php if (function_exists('gkl_postavatar')) gkl_postavatar('example', '', ''); ?>

the result will be this:

<img class=”example” src=”” alt=”title of post” style=”width:100px; height:100px; border:none;” />

Define your own HTML
It is also possible to define your own HTML. Then you can use the string-parameters “before” and “after”:
If before = <p class=”mypic”> and after = </p> in this example:

<?php if (function_exists('gkl_postavatar')) gkl_postavatar('', '<p class="mypic">', '</p>'); ?>

will result in:

<p class=”mypic”><img src=”” alt=”title of post” style=”width:100px; height:100px; border:none;” /></p>

Image Without Styling
To show the image without any divs place this in The Loop:

<?php if (function_exists('gkl_postavatar')) gkl_postavatar('', '', ''); ?>

to get:

<img src=”” alt=”title of post” style=”width:100px; height:100px; border:none;” />

Back to Top


Thanks to all these people for translating Post Avatar

59 thoughts on “Post Avatar

  1. Just a quick note that this plugin is incompatible with multi-site installations; post avatars will only work on the primary blog and any attempt to configure them on other blogs in the network will just send you back to the dashboard of the primary blog.

  2. good image posting plugins, with some good Features
    Easy selection of images in the Write Post screen.
    Allows the following file types: .jpg, .jpeg, .gif and .png.
    Settings display avatars automatically or through the use of template tags.
    Customize html output of avatars.


  3. Hello,

    The alt tags generated by Post Avatar are currently the title with dashes. Is there a way to make it without dashes? That’s more useful for SEO purposes, I think. Thanks!

  4. Pingback: 25 Useful Free WordPress Plugins For Multi-Author Blogs | Getto-Technology

  5. In keeping with WordPress practices, I will only be accepting personal or project/development websites for translation link credits.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>