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, a type of wasp) and flies (Diptera), though some beetles 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 specific 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.
It has been suggested that some patterns of leaf variegation may be part of a defensive strategy employed by plants to deceive adult leaf miners into thinking that a leaf has already been preyed upon.
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 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.