  Many quintessence models possess scaling or attractor solutions where the
fraction of dark energy follows the dominant component in previous epochs of
the expansion, or phase transitions may happen close to matter-radiation
equality time. A non-negligible early dark energy (EDE) fraction around
matter-radiation equality could contribute to alleviate the $H_0$ tension. We
constrain the EDE fraction using two approaches: first, we use a fluid
parameterization that mimics the plateaux of the dominant components in the
past. An alternative tomographic approach constrains the EDE density in binned
redshift intervals. This allows us to reconstruct $\Omega_{de}(z)$ before and
after the decoupling of the CMB photons. We have employed Planck data 2018, the
Pantheon supernovae of Type Ia (SNIa), galaxy clustering data, the prior on the
absolute magnitude of SNIa by SH0ES, and weak lensing (WL) data from
KiDS+VIKING-450 and DES-Y1. When we use a minimal parameterization mimicking
the background plateaux, EDE has only a small impact on current cosmological
tensions. The constraints on the EDE fraction weaken considerably when its
sound speed is allowed to vary. By means of our binned analysis we put very
tight constraints on the EDE fraction around the CMB decoupling time, $\lesssim
0.4\%$ at $2\sigma$ c.l. We confirm previous results that a significant EDE
fraction in the radiation-dominated epoch (RDE) loosens the $H_0$ tension, but
tends to worsen the $\sigma_8$ one. The presence of EDE in the matter-dominated
era helps to alleviate this issue. When the SH0ES prior and WL data are
considered in the fitting analysis in combination with data from CMB, SNIa and
baryon acoustic oscillations, the EDE fractions are constrained to be $\lesssim
2.6\%$ in the RDE epoch and $\lesssim 1.5\%$ in the redshift range $z\in
(100,1000)$ at $2\sigma$ c.l. The tensions remain at $\sim 2-3\sigma$ c.l.
