1. A method comprising: grouping photos into a plurality of groups of photos, wherein the photos are grouped such that the photos in a particular group are similar to each other, wherein the grouping comprises: detecting visual elements in each of the photos; grouping photos that have similar visual elements; and merging a photo or group of photos with an existing group of photos if the photos in a resulting merged group are similar; selecting a plurality of representative photos, wherein each representative photo represents a respective group from the plurality of groups, wherein the selecting comprises: determining one or more attribute scores based on one or more different types of attributes; determining a quality score of each of the photos based on the one or more attribute scores, wherein the one or more attribute scores are based on attributes including one or more of faces of people, landmarks, and cropping limitations, wherein the selecting of a particular representative photo is based on a ranking of quality scores, and wherein the representative photo for each group gives a comprehensive summary of the respective group; and enabling the plurality of representative photos to be shared.