Custom Icons for admins and moderators (and other groups)

I just want to assign an icon to certain groups to display next to the users name, like admins and mods (and also change the icons for admins and mods). So it’s like this on the user profile and next to their names on all posts: