I need some explanation in this postion

Sort:
Avatar of kwkingdom123

In this position, the book recommended move is g5, and then f5. However, I don't see what's wrong with fxg5, since doesn't that open the king to attack?