  Multiply-imaged quasars and AGNs observed in the mid-infrared (MIR) range are
commonly assumed to be unaffected by the microlensing produced by the stars in
their lensing galaxy. In this paper, we investigate the validity domain of this
assumption. Indeed, that premise disregards microlensing of the accretion disc
in the MIR range, and does not account for recent progress in our knowledge of
the dusty torus. To simulate microlensing, we first built a simplified image of
the quasar composed of an accretion disc, and of a larger ring-like torus. The
mock quasars are then microlensed using an inverse ray-shooting code. We
simulated the wavelength and size dependence of microlensing for different
lensed image types and fraction of compact objects projected in the lens. This
allows us to derive magnification probabilities as a function of wavelength, as
well as to calculate the microlensing-induced deformation of the spectral
energy distribution of the lensed images. We find that microlensing variations
as large as 0.1 mag are very common at 11 microns (observer-frame). The main
signal comes from microlensing of the accretion disc, which may be significant
even when the fraction of flux from the disc is as small as 5 % of the total
flux. We also show that the torus of sources with Lbol <~ 10^45 erg/s is
expected to be noticeably microlensed. Microlensing may thus be used to get
insight into the rest near-infrared inner structure of AGNs. Finally, we
investigate whether microlensing in the mid-infrared can alter the so-called
Rcusp relation that links the fluxes of the lensed images triplet produced when
the source lies close to a cusp macro-caustic. This relation is commonly used
to identify massive (dark-matter) substructures in lensing galaxies. We find
that significant deviations from Rcusp may be expected, which means that
microlensing can explain part of the flux ratio problem.

Cosmology and Nongalactic Astrophysics;High Energy Astrophysical Phenomena