The direct photon spectra and flow ($v_2$, $v_3$) in heavy-ion collisions at SPS, RHIC and LHC energies are investigated within a relativistic transport approach incorporating both hadronic and partonic phases -- the Parton-Hadron-String Dynamics (PHSD). In the present work, four extensions are introduced compared to our previous calculations: (i) going beyond the soft-photon approximation (SPA) in the calculation of the bremsstrahlung processes $meson+mesonto meson+meson+gamma$, (ii) quantifying the suppression due to the Landau-Pomeranchuk-Migdal (LPM) coherence effect, (iii) adding the additional channels $V+Nto N+gamma$ and $Deltato N+gamma$ and (iv) providing predictions for Pb+Pb collisions at $sqrt{s_{NN}}$ = 2.76 TeV. The first issue extends the applicability of the bremsstrahlung calculations to higher photon energies in order to understand the relevant sources in the region $p_T=0.5-1.5$ GeV, while the LPM correction turns out to be important for $p_T<0.4$ GeV in the partonic phase. The results suggest that a large elliptic flow $v_2$ of the direct photons signals a significant contribution of photons produced in interactions of secondary mesons and baryons in the late (hadronic) stage of the heavy-ion collision. In order to further differentiate the origin of the direct photon azimuthal asymmetry (late hadron interactions vs electromagnetic fields in the initial stage), we provide predictions for the triangular flow $v_3(p_T)$ of direct photons. Additionally, we illustrate the magnitude of the photon production in the partonic and hadronic phases as functions of time and local energy density. Finally, the cocktail method for an estimation of the background photon elliptic flow, which is widely used in the experimental works, is supported by the calculations within the PHSD transport approach.