1. A method to control an image processing apparatus, the method comprising: obtaining linkage information representing a hierarchical relation between a plurality of image files, the linkage information including creation time and creation position; determining a link relation between the plurality of image files based on the linkage information; and recording the determined link relation as metadata in each of the plurality of image files, wherein the determined link relation including information of relative levels in the hierarchical relation between the plurality of image files, the relative levels being classified into upper and lower levels.