custom avatars

Hi all,
I have a question about the avatars.
I wish have in my forum this avatar management:
the user can't choose the avatar,
the avatar is a png image referenced by the id of the user... example
I have the userid = 1234, my avatar is

how can I do this?

thanks in advance!