We revise the bound from the supernova SN1987A on the coupling of ultralight axion-like particles ( ALPs ) to photons . In a core-collapse supernova , ALPs would be emitted via the Primakoff process , and eventually convert into gamma rays in the magnetic field of the Milky Way . The lack of a gamma-ray signal in the GRS instrument of the SMM satellite in coincidence with the observation of the neutrinos emitted from SN1987A therefore provides a strong bound on their coupling to photons . Due to the large uncertainty associated with the current bound , we revise this argument , based on state-of-the-art physical inputs both for the supernova models and for the Milky-Way magnetic field . Furthermore , we provide major amendments , such as the consistent treatment of nucleon-degeneracy effects and of the reduction of the nuclear masses in the hot and dense nuclear medium of the supernova . With these improvements , we obtain a new upper limit on the photon–ALP coupling : g _ { a \gamma } \lesssim 5.3 \times 10 ^ { -12 } \textrm { GeV } ^ { -1 } , \textrm { % for } m _ { a } \lesssim 4.4 \times 10 ^ { -10 } ~ { } \textrm { eV } , and we also give its dependence at larger ALP masses m _ { a } . Moreover , we discuss how much the Fermi-LAT satellite experiment could improve this bound , should a close-enough supernova explode in the near future .