private function addUrls($entities, $locale)
    {
        $ids = array_filter(array_column($entities, 'id'));
        $apiEntities = $this->getMediaManager()->getByIds($ids, $locale);
        $i = 0;
        foreach ($entities as $key => $entity) {
            $entities[$key]['url'] = $apiEntities[$i]->getUrl();
            ++$i;
        }

        return $entities;
    }