To enable improved reconstruction of magnetic resonance (MR) image data from MR scan data acquired from an examination object using dynamic shimming in an MR scanner that has a shim unit with at least one shim channel, an examination region of the object is divided into multiple sections, a B0 field of the examination region is scanned, and a B0 field map is thereby generated, a number of shim parameter sets are determined for the shim channel using the B0 field map, with a first shim parameter set of the number of shim parameter sets being determined for a first section of the multiple sections, and a second shim parameter set of the multiple shim parameter sets is determined for a second section of the multiple sections. MR scan data of the examination region are acquired, but before acquiring the MR scan data from the first section, the shim channel is adjusted using the first shim parameter set and, before acquiring the MR scan data from the second section, the shim channel is adjusted using the second shim parameter set. MR image data are reconstructed from the MR scan data using the first B0 field map and the number of shim parameter sets.