We construct a set of parton distribution functions (PDFs), based on the recent NNPDF4.0 PDF set, that also include a photon PDF. The photon PDF is constructed using the LuxQED formalism, while QED evolution accounting for $${\mathcal {O}}\left( \alpha \right) $$
O
α
, $${\mathcal {O}}\left( \alpha \alpha _s\right) $$
O
α
α
s
, and $${\mathcal {O}}\left( \alpha ^2\right) $$
O
α
2
corrections is implemented and benchmarked by means of the EKO code. We investigate the impact of QED effects on NNPDF4.0, and compare our results both to our previous NNPDF3.1QED PDF set and to other recent PDF sets that include the photon. We assess the impact of photon-initiated processes and electroweak corrections on a variety of representative LHC processes, and find that they can reach the 5% level in vector boson pair production at large invariant mass.