Reduce number of Ajax calls for images by doing in batch