In this talk I will discuss finite-size effects associated to electromagnetic corrections in lattice QCD simulations. This kind of isospin breaking is in general needed for systematically improvable Standard Model predictions, and is challenging due to the long-range nature of the electromagnetic force. The associated finite-size effects in particular depend on the adopted finite-volume prescription of QED, and as will be shown here they can be predicted analytically using effective field theory techniques. Particular examples from leptonic decays of pions and kaons to the muon anomalous magnetic moment will be discussed.