  Elastic systems, such as magnetic domain walls, density waves, contact lines,
and cracks, are all pinned by substrate disorder. When driven, they move via
successive jumps called avalanches, with power law distributions of size,
duration and velocity. Their exponents, and the shape of an avalanche, defined
as its mean velocity as function of time, have recently been studied. They are
known approximatively from experiments and simulations, and were predicted from
mean-field models, such as the Brownian force model (BFM), where each point of
the elastic interface sees a force field which itself is a random walk. As we
showed in EPL 97 (2012) 46004, the BFM is the starting point for an $\epsilon =
d_{\rm c}-d$ expansion around the upper critical dimension, with $d_{\rm c}=4$
for short-ranged elasticity, and $d_{\rm c}=2$ for long-ranged elasticity. Here
we calculate analytically the ${\cal O}(\epsilon)$, i.e. 1-loop, correction to
the avalanche shape at fixed duration $T$, for both types of elasticity. The
exact expression is well approximated by $\left< \dot u(t=x T)\right>_T\simeq [
Tx(1-x)]^{\gamma-1} \exp\left( {\cal A}\left[\frac12-x\right]\right)$, $0<x<1$.
The asymmetry ${\cal A}\approx - 0.336 (1-d/d_{\rm c})$ is negative for $d$
close to $d_{\rm c}$, skewing the avalanche towards its end, as observed in
numerical simulations in $d=2$ and $3$. The exponent $\gamma=(d+\zeta)/z$ is
given by the two independent exponents at depinning, the roughness $\zeta$ and
the dynamical exponent $z$. We propose a general procedure to predict other
avalanche exponents in terms of $\zeta$ and $z$. We finally introduce and
calculate the shape at fixed avalanche size, not yet measured in experiments or
simulations.
