Title: Picture by post?
Last modified: August 18, 2016

---

# Picture by post?

 *  [nir0c](https://wordpress.org/support/users/nir0c/)
 * (@nir0c)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/picture-by-post/)
 * Hey. I was wondering, how can I add a picture/avatar by my posts? So for example.
   If I was to post something by my post on the left there will be an avatar. How
   can I do that? What do I need to do? Probably this question has been asked many
   times, but I did a search and I couldn’t find anything. So if anyone could point
   in the right direction that would be great. Thanks in advance…
    nir0c

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Chris J. Davis](https://wordpress.org/support/users/chrisjdavis/)
 * (@chrisjdavis)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/picture-by-post/#post-25055)
 * Well basically you would use the same system as some have suggested to display
   images automagically.
    First you would obviously need to add the appropriate 
   CSS to your stylesheet, probably a float of some kind. Then hard code its placement
   into your template, that would be my suggestion at least. Then pick the image/
   avatars you are going to use, and name them _exactly_ as each handle/identity
   on your site(authors). Then dump them all into a folder, for this example lets
   assume you store all your images in a folder named gfx, and inside that folder
   you create another folder titled avatars. So now your relative URL for the avatars
   would be gfx/avatars/. where ever you have coded in the avatar float, insert 
   this code: ` <div class="mysuperfloat"> <img src="gfx/avatars/<?php the_author()?
   >.gif" alt="my goofy pic" /> </div>  I haven’t tested this yet, just off the 
   top of my head. I will try and test this out later today and check back in. At
   the least this is a place to start. Remember though the images need to be named
   exactly as the coresponding author’s nickname, or it will bork. Hope this helps
   Jesuit
 *  [Dougal Campbell](https://wordpress.org/support/users/dougal/)
 * (@dougal)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/picture-by-post/#post-25065)
 * BTW, this technique is described in [the readme](http://wordpress.org/development/readme.html).
   Search for ‘the_author_login()’.

Viewing 2 replies - 1 through 2 (of 2 total)

 The topic ‘Picture by post?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [Dougal Campbell](https://wordpress.org/support/users/dougal/)
 * Last activity: [22 years, 11 months ago](https://wordpress.org/support/topic/picture-by-post/#post-25065)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
