The $R^2$ term in the Starobinsky inflationary model can be regarded as a leading quantum correction to the gravitational effective action. We assume that parity-preserving and parity-violating (axial) non-minimal couplings between curvature and electromagnetic field are also present in the effective action. In the Einstein frame, they turn into non-trivial couplings of the scalaron and curvature to the electromagnetic field. We make an assessment of inflationary magnetogenesis in this model. In the case of parity-preserving couplings, amplification of magnetic field is negligibly small. In the case of axial couplings, magnetogenesis is hampered by strong back-reaction on the inflationary process, resulting in possible amplification of magnetic field at most by the factor $10^5$ relative to its vacuum fluctuations.