A join in the query won't work in this case, (as the example you posted) as there will be multiple entries in the USER_GROUPS table. So you can only join to one of them. So this won't be possible using the same query. It'll only join to one row in the USER_GROUPS table, probably the first entry. But the users will have an entry in this table for each usergroup they belong to.
You'd either need
a) To do an additional query per post to the USER_GROUP table to grab all the groups that the user belongs to. (That'll add alot of queries - NOT RECOMMENDED)
b) Or you'll need to devise a method to store the image that needs to be displayed in the USER_PROFILE table, so you can grab the image with the rest of the profile info and display it using the same query.
c) You could probably grab all the contents of the USER_GROUP table and store them in an array, then compare against this when you display each post, see if the user is in the group. This would be just one additional query on the page. But if you have alot of users or alot of groups, the array could be sizeable and hog up alot of memory.
I've seen other software products which are structured exactly like the new UBBThreads, and option b is really the way you'd have to go.