The construction of an alternative electromagnetic theory that preserves Lorentz and gauge symmetries, is considered. We start off by building up Maxwell electrodynamics in (3+1)D from the assumption that the associated Lagrangian is a gauge-invariant functional that depends on the electron and photon fields and their first derivatives only. In this scenario, as well-known, it is not possible to set up a Lorentz invariant gauge theory containing a massive photon. We show nevertheless that there exist two radically different electrodynamics, namely, the Chern-Simons and the Podolsky formulations, in which this problem can be overcome. The former is only valid in odd space-time dimensions, while the latter requires the presence of higher-order derivatives of the gauge field in the Lagrangian. This theory, usually known as Podolsky electrodynamics, is simultaneously gauge and Lorentz invariant; in addition, it contains a massive photon. Therefore, a massive photon, unlike the popular belief, can be adequately accommodated within the context of a gauge-invariant electrodynamics.