Re: extending groups slug with images
Depends on where you are.
If you are in the member theme group pages the global $group_obj is available. It’s an instance of BP_Groups_Group class for the current group.
If you are in a group template then the fn bp_get_group_id() in bp-groups-templatetags.php gets you the current group’s id.
Or you could always use the class method BP_Groups_Group::get_id_from_slug($slug) in bp-groups-classes.php