1. A method in a computing device with a processor and a computer-readable storage medium for cropping an image with an original composition, the method comprising: providing image templates, each image template having a condition and a goal for a cropped composition, each condition of an image template specifying a number of one or more face areas within an image, each face area containing one or more faces, and a size of the one or more face areas within the image, each goal of an image template specifying an ideal location of significant areas of an image within a cropped image, the significant areas including face areas and attended areas of an image, an attended area being a region of interest of an image that does not include a face; providing an objective function that generates an overall rating of a candidate cropping of the image based on a rating of the candidate cropping of the image to meet the goal of an image template, a rating of the original composition of the image relative to the candidate cropping, and a rating of how well the candidate cropping preserves faces; identifying a number of one or more face areas within the image and the size of the one or more identified face areas, each identified face area containing one or more faces; selecting an image template whose condition is satisfied by the image based on the identified number of face areas and the identified size of the one or more identified face areas; identifying the candidate cropping based on the overall rating of the objective function of the candidate cropping to the selected image template; and cropping the image in accordance with the identified candidate cropping wherein the identifying, selecting, and cropping are performed by the processor executing computer-executable instructions stored in the computer-readable storage medium and wherein the image templates and objective function are stored in the computer-readable storage medium.