The invention provides for a magnetic resonance imaging system (100, 300, 500) with a gradient coil system (110, 112, 113) that comprises a set of gradient coils (110) configured for generating a gradient, a gradient coil amplifier (112), and a current sensor system (113) configured for measuring current sensor data (146) descriptive of the electrical current supplied to each of the set of gradient coils. Execution of the machine executable instructions causes a processor to: control (200) the magnetic resonance imaging system with the pulse sequence commands (142) to acquire magnetic resonance imaging data; record (202) the current sensor data during the acquisition of the magnetic resonance imaging data; calculate (204) a corrected k-space trajectory (150) using the current sensor data and a gradient coil transfer function (148); and reconstruct (206) a corrected magnetic resonance image (152) using the magnetic resonance imaging data and the corrected k-space trajectory.