We need to condense and optimize the collection of metadata from the IDR API while looping through image ids.