Yes you can do this if you are on the Standard plan or greater as a part of TalkJS Themes. To enable this first go to your dashboard and find the role (formerly called configuration) heading.

Note: Configurations are now called ‘Roles’
Then either select a current role or make a new one. When a role has been selected scroll down until you reach the themes heading, there you should see the option to enable avatars next to messages, as shown below: