A leaf miner is the larva of an insect that lives in and eats the leaf tissue of plants. The vast majority of leaf-mining insects are moths (Lepidoptera), sawflies (Symphyta) and flies (Diptera), though beetles and wasps also exhibit this behavior.
Like Woodboring beetles, leaf miners are protected from many predators and plant defenses by feeding within the tissues of the leaves themselves, selectively eating only the layers that have the least amount of cellulose. When attacking Quercus robur (English oak), they also selectively feed on tissues containing lower levels of tannin, a deterrent chemical produced in great abundance by the tree.
The precise pattern formed by the feeding tunnel is very often diagnostic for which kind of insect is responsible, sometimes even to genus level. The mine often contains frass, or droppings, and the pattern of frass deposition, mine shape and host plant identity are useful to determine the species of leaf miner. A few mining insects utilise other parts of a plant, such as the surface of a fruit.
Some patterns of leaf variegation are part of a defense strategy employed by plants to deceive adult leaf miners into thinking that the leaf has already been preyed-upon.
Relationship with humans 
Leaf miners are regarded as pests by many farmers and gardeners as they can cause damage to agricultural crops and garden plants, and can be difficult to control with insecticide sprays as they are protected inside the plant's leaves. Spraying the infected trees/plants with Spinosad, an organic insecticide, will control the leaf miner. Spinosad does not kill on contact but must be ingested by the leaf miner. Two or three applications may be needed in a season, being careful not to spray when bees are around.
Leaf miner infection can be reduced or prevented by planting trap crops near the plants to be protected. For example, lambsquarter, columbine, and velvetleaf will distract leaf miners, drawing them to those plants and therefore reducing the incidence of attack on nearby crops. This is a method of companion planting.
See also 
- Agromyzidae (Leaf miner flies)
- Pegomya hyoscyami (Spinach / beet leaf miner)
- Douglasiidae (including Tinagma, the largest genus of Douglasiidae)
- Horse-chestnut leaf miner (Cameraria ohridella)
- Tenthredinidae (some species)
- Tischerioidea (Trumpet leaf-miner moths)
|Wikimedia Commons has media related to: Leaf mining|
- British leafminers - many of which are distributed widely across Europe.
- The leaf and stem mines of British flies and other insects. Includes illustrated keys for identification of mines by host plant genus and detailed descriptions of over 900 species along with their distribution in Great Britain and Northern Ireland and elsewhere.
- Leafminers of Europe - covers over 1800 leafmining insect species.
- leafminers of southeastern U.S. woody ornamentals on the UF / IFAS Featured Creatures Web site
- Liriomyza trifolii, American serpentine leafminer
- Liriomyza sativae, vegetable leafminer
- Phyllocnistis citrella, citrus leafminer
- CISR: Citrus Leaf Miner Center for Invasive Species Research page on Citrus Leaf Miner