search related images with array of image ids