In this proceedings article we present a selected set of our lattice results regarding the effect
that background electromagnetic fields have on the topology of QCD. In particular, we report on
the lattice spacing-dependence of the axion-photon coupling as well as on the response of the
topological susceptibility to strong magnetic fields at nonzero temperatures. We demonstrate that
the ratio of topological susceptibilities at finite to zero magnetic field has a well behaved continuum
limit at low temperatures using a reweighting technique. Moreover, we study the scaling of the
axion-photon coupling towards the continuum limit and show that it is less severely affected by
discretisation effects.