Code:
<if condition="$post['field5'] == 'Male'"><img src"images/creativecreature/misc/male_icon.png">
<else /><img src"images/creativecreature/misc/female_icon.png">
</if>
Maybe you are using vertical postbit. Add the code in both the templates, postbit as well as postbit_legacy. Add it after the username.
Make sure to change the red parts in above code with actual values for your forum. They are case-sensitive.