1. A method comprising: identifying, by one or more processors, a plurality of images associated with a plurality of documents; determining, by the one or more processors, shapes of the plurality of images; creating, by the one or more processors, a set of candidate images, from the plurality of images, based on the shapes of the plurality of images and whether there are links associated with the plurality of images; identifying, by the one or more processors, a caption associated with a candidate image of the set of candidate images and a number of times that words in the caption appear in bodies of the plurality of documents; determining, by the one or more processors, a score for the candidate image in the set of candidate images based on distances between the candidate image and topics associated with the plurality of documents, and overlaps between the caption and the topics associated with the plurality of documents, wherein the overlaps are indicated by the identified number of times; selecting, by the one or more processors, a representative image, from the set of candidate images, based on the score determined for the set of candidate images; and associating, by the one or more processors, the representative image with the plurality of documents.