1. A computer-implemented method comprising: receiving, by a data processing apparatus, data specifying a first image; receiving, by the data processing apparatus, text labels for the first image; for each of one or more of the text labels: receiving, by the data processing apparatus, data describing a set of web resources that each have at least a threshold relevance score that measures the relevance of the web resource to the text label; assigning, by the data processing apparatus, a text label ranking score to the text label based on a number of the resources in the set of web resources that include an image matching the first image; ranking, by the data processing apparatus, the text labels, at least in part, based on the text label ranking scores assigned to text labels; and selecting, by the data processing apparatus, an image label for the first image from the ranked text labels, the image label being selected based on the ranking.