  We compute the leading QED corrections to the hadronic vacuum polarization
(HVP) of the photon, relevant for the determination of leptonic anomalous
magnetic moments, $a_\ell$. We work in the electroquenched approximation and
use dynamical QCD configurations generated by the CLS initiative with two
degenerate flavors of non-perturbatively O($a$)-improved Wilson fermions. We
consider QED$_{\rm L}$ and QED$_{\rm M}$ to deal with the finite-volume zero
modes. We compare results for the Wilson loops with exact analytical
determinations. In addition we make sure that the volumes and photon masses
used in QED$_{\rm M}$ are such that the correct dispersion relation is
reproduced by the energy levels extracted from the charged pions two-point
functions. Finally we compare results for pion masses and the HVP between
QED$_{\rm L}$ and QED$_{\rm M}$. For the vacuum polarization, corrections with
respect to the pure QCD case, at fixed pion masses, turn out to be at the
percent level.
