  In this work, we introduce a parametrization of early dark energy that mimics
radiation at early times and governs the present acceleration of the Universe.
We show that such parametrization models non-linear electrodynamics in the
early Universe and investigate the cosmological viability of the model. In our
scenario, the early dark energy is encoded in the non-linearity of the
electromagnetic fields through a parameter $\beta$ that changes the Lagrangian
of the system, and the parameters $\gamma_s$ and $\alpha$, that define the
departure from the standard model constant equation of state. We use a Bayesian
method and the modular software \textsc{CosmoSIS} to find the best values for
the model's free parameters with precomputed likelihoods from Planck 2018,
primordial nucleosynthesis data, inferred distances from different wide galaxy
surveys and luminosity distances of SNIa from Pantheon and SH0ES, such that
$\gamma_s =$ 0.468 $\pm$ 0.026 and $\alpha =$ -0.947 $\pm$ 0.032, as opposed to
$\Lambda$CDM where $\gamma_s = \beta =$ 0 and there is no equivalence for the
$\alpha$ parameter. Our results predict an earlier formation of the structure
and a shorter age of the Universe compared with the canonical cosmological
model. One of the main findings of our work is that this kind of dark energy
alleviates the ongoing tensions in cosmology, the Hubble tension and the
so-called $\sigma_8$ tension, which predicted values by our model are H$_o =$
70.2 $\pm$ 0.9 km/s/Mpc and $\sigma_8 =$ 0.798 $\pm$ 0.007. The reported values
lie between the inferred values inferred from early and late (local) Universe
observations. Future observations will shed light on the nature of the dark
energy, its impact on the structure formation, and its dynamics.
