In the first Shrek film, Shrek compares ogres to onions.
During a conversation with Donkey, Shrek explains that ogres are like onions because both have layers. The line becomes one of the film's best-known pieces of dialogue and expresses Shrek's argument that ogres are more complicated than their frightening appearance suggests.
The comparison also anticipates the film's emotional story. Shrek initially presents himself as a solitary creature who wants privacy, but his journey with Donkey and Fiona gradually reveals vulnerability, insecurity, and a desire for companionship. The onion metaphor therefore works both as a joke and as a concise description of the character.
Some viewers remember the comparison as garlic or cabbage because those foods can also have layers or strong smells. The canonical line, however, specifically names onions. The phrase is spoken during the road journey to rescue Fiona, before Shrek and Donkey reach the dragon's castle.