Below you can see the front-view size comparison of the Panasonic G5 and Panasonic GX8. The Panasonic GX8 is 5 mm shorter and 8 mm thinner than the Panasonic G5 but it is also 13 mm wider.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.