Leaf miner

A leaf miner is the larva of an insect which lives inside a leaf and eats it. Most leaf-mining insects are moths (Lepidoptera), sawflies (Symphyta, a type of wasp) and flies (Diptera). Some beetles also do this.
Like woodboring beetles, leaf miners are protected from many predators and plant defences by feeding inside a leaf, eating its tissues. It eats only the layers that have the least cellulose. Also, when attacking "Quercus robur" (English oak), they feed on tissues with lower levels of tannin. Tannin is a chemical produced in abundance by the tree. It is not edible.
The pattern of the feeding tunnel and the layer of the leaf being mined shows what insect is responsible, sometimes even to the exact species. The mine often contains frass, or droppings, and the pattern of frass deposition, mine shape, and host plant identity show the species and instar of the leaf miner. A few mining insects feed in 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 used by plants. It deceives adult leaf miners into thinking that a leaf has already been preyed upon.