1. A method comprising: receiving, by one or more computers, a reference image; identifying, by the one or more computers, a sub-image of the reference image by analyzing the reference image, receiving, by the one or more computers, a bid associated with the sub-image of the reference image, the bid comprising a bid for presenting a sponsored-content item, storing, by the one or more computers, the received bid in association with the reference image and the sponsored-content item; in response to a request for an advertisement, the request including a bid image, identifying, by the one or more computers, a sub-image of the bid image by analyzing the bid image and comparing, by the one or more computers, the reference image to the bid image wherein comparing the reference image to the bid image comprises comparing the sub-image of the bid image to the sub-image of the reference image; determining, by the one or more computers, a similarity between the reference image and the bid image based on the comparison, wherein determining the similarity comprises: generating a likelihood that the sub-image of the bid image is the same as the sub-image of the reference image using object recognition techniques, and determining whether the bid image is similar to the reference image based on a comparison between the likelihood and a threshold; and presenting, by the one or more computers, the sponsored-content item based on the similarity between the reference image and the bid image.