International audienceWe provide a general framework for deriving Hamiltonian electromagnetic gyrofluid models from a Hamiltonian system of gyrokinetic equations. The presented procedure permits to derive gyrofluid models for an arbitrary number of moments with respect to the velocity coordinate parallel to an equilibrium magnetic field. The resulting gyrofluid models account, in particular, for finite Larmor radius effects, equilibrium temperature anisotropies and fluctuations of the magnetic field in the direction parallel to the equilibrium magnetic field, thus generalizing Hamiltonian gyrofluid models previously presented in the literature. The Hamiltonian reduction procedure leading from the parent gyrokinetic model to the gyrofluid mo...